From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.7764.1636002911064662722 for ; Wed, 03 Nov 2021 22:15:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 04 Nov 2021 13:15:05 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Ard Biesheuvel'" , "'Yao, Jiewen'" , "'Justen, Jordan L'" , "'Gerd Hoffmann'" , "'Michael Kubacki'" , "'Wang, Jian J'" , "'Maciej Rabeda'" , "'Wu, Jiaxin'" , "'Fu, Siyuan'" , "'Leif Lindholm'" , "'Liu, Zhiguang'" References: <20211101213737.586-1-michael.d.kinney@intel.com> <006201d7cf91$b9e15980$2da40c80$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoIFYyIDAvN10gUmVwcm9kdWNlIGJ1aWxkcyBhY3Jvc3Mgc291cmNlIGZvcm1hdCBjaGFuZ2Vz?= Date: Thu, 4 Nov 2021 13:15:08 +0800 Message-ID: <007401d7d13a$ef4e3f70$cdeabe50$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIZONpyVmW43l3onK7cMciy0JFccwFbcEzoAxFOB/yrTJ00QA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Mike: I understand your point. This change is just for the binary comparison in= NOOPT builds with all DEBUG and ASSERT macros enabled. I have no other com= ments.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Michael D > Kinney > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B411=E6=9C=882=E6=97=A5 = 15:11 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel@= edk2.groups.io; > Kinney, Michael D > =E6=8A=84=E9=80=81: 'Ard Biesheuvel' ; Yao, Ji= ewen > ; Justen, Jordan L ; 'Ge= rd > Hoffmann' ; 'Michael Kubacki' > ; Wang, Jian J ; > 'Maciej Rabeda' ; Wu, Jiaxin > ; Fu, Siyuan ; 'Leif Lindholm' > ; Liu, Zhiguang > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [Patch V2 0/7] Reproduce builds acro= ss source format > changes >=20 > Hi Liming, >=20 > RELEASE in tools_def.txt only means disable symbols. > It does not mean disable DEBUG() and ASSERT(). > Some platforms use DEBUG/RELEASE build type to control > DEBUG() and ASSERT(), but that is not required. >=20 > In order to do binary build comparison, I am actually having to > use NOOPT builds because optimizing builds add extra information > to the objs and libs that seems to include line number related > information. I do want to make sure all the logic associated > with use of DEBUG and ASSERT macros are not changed from a > source format change. So we actually want NOOPT builds with all > DEBUG and ASSERT macros enabled. >=20 > I have a python helper script to do a build comparison. I will > be sending that for review tomorrow. >=20 > Mike >=20 >=20 > > -----Original Message----- > > From: gaoliming > > Sent: Monday, November 1, 2021 7:31 PM > > To: Kinney, Michael D ; > devel@edk2.groups.io > > Cc: 'Ard Biesheuvel' ; Yao, Jiewen > ; Justen, Jordan L > > ; 'Gerd Hoffmann' ; > 'Michael Kubacki' ; Wang, > > Jian J ; 'Maciej Rabeda' > ; Wu, Jiaxin ; Fu, > > Siyuan ; 'Leif Lindholm' ; Liu, > Zhiguang > > Subject: =E5=9B=9E=E5=A4=8D: [Patch V2 0/7] Reproduce builds across sou= rce format > changes > > > > Mike=EF=BC=9A > > Seemly, this change is for debug image build reproduce. But, if the f= ixed > > value is used, they are not correct for the debug image. If so, can REL= EASE > > image be used for the binary comparison? > > > > Thanks > > Liming > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Michael D Kinney > > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B411=E6=9C=882=E6=97= =A5 5:38 > > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > > > =E6=8A=84=E9=80=81: Ard Biesheuvel ; Jiewe= n Yao > > > ; Jordan Justen ; > Gerd > > > Hoffmann ; Michael Kubacki > > > ; Jian J Wang ; > > > Maciej Rabeda ; Jiaxin Wu > > > ; Siyuan Fu ; Liming Gao > > > ; Leif Lindholm ; > Zhiguang > > > Liu > > > =E4=B8=BB=E9=A2=98: [Patch V2 0/7] Reproduce builds across source for= mat changes > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3688 > > > > > > New in V2 > > > ------------ > > > * Split MdePkg DebugLib class enhancements out into its own commit > > > * Address ECC failures > > > * Align macro continuation marks in same column > > > > > > This change is required to help verify that source code formatting > > > changes such as the use of uncrustify and line ending corrections > > > do not have any functional differences. Source format changes may > > > add or remove line endings that change the source file line numbers > > > of C statements or may change the use of spaces in C expressions > > > used in an ASSERT() statements. These types of changes can impact > > > the generated binaries when DEBUG() and ASSERT() macros are > > > enabled. The following set of changes adds 2 defines that can be use= d > > > to override the use of `__LINE__` in DEBUG() macros and the use of > > > #Expression in ASSERT() macros. > > > > > > * Add DEBUG_LINE_NUMBER define to DebugLib.h that is > > > by default mapped to `__LINE__`. A build can pre-define > > > DEBUG_LINE_NUMBER to use a fixed value. > > > * Add DEBUG_EXPRESSION_STRING(Expression) macros to > > > DebugLib.h that is by default mapped to #Expression. > > > A build can define DEBUG_EXPRESSION_STRING_VALUE to > > > set all expression strings to a fixed string value. > > > * Use DEBUG_LINE_NUMBER instead of `__LINE__`. > > > * Use DEBUG_EXPRESSION_STRING instead of #Expression. > > > > > > Submodules that use `__LINE__` are not updated. These do not > > > currently impact build reproducibility unless the debug features > > > of those submodules are enabled. > > > > > > The one exception is the UnitTestFrameworkPkg cmocka submodule > > > that uses `__LINE__`. This means that the binaries generated by host > > > based unit tests that use cmocka features may not be identical across > > > a source format change. > > > > > > Cc: Ard Biesheuvel > > > Cc: Jiewen Yao > > > Cc: Jordan Justen > > > Cc: Gerd Hoffmann > > > Cc: Michael Kubacki > > > Cc: Jian J Wang > > > Cc: Maciej Rabeda > > > Cc: Jiaxin Wu > > > Cc: Siyuan Fu > > > Cc: Liming Gao > > > Cc: Leif Lindholm > > > Cc: Zhiguang Liu > > > Signed-off-by: Michael D Kinney > > > > > > Michael D Kinney (7): > > > MdePkg/Include: Enhance DebugLib to support reproduce builds > > > MdePkg: Reproduce builds across source format changes > > > ArmPkg: Reproduce builds across source format changes > > > MdeModulePkg: Reproduce builds across source format changes > > > NetworkPkg: Reproduce builds across source format changes > > > SecurityPkg: Reproduce builds across source format changes > > > OvmfPkg: Reproduce builds across source format changes > > > > > > .../ProcessorSubClassDxe/ProcessorSubClass.c | 2 +- > > > .../Type00/MiscBiosVendorFunction.c | 2 +- > > > .../Type01/MiscSystemManufacturerFunction.c | 2 +- > > > .../MiscBaseBoardManufacturerFunction.c | 2 +- > > > .../Type03/MiscChassisManufacturerFunction.c | 2 +- > > > ...MiscNumberOfInstallableLanguagesFunction.c | 2 +- > > > .../Type32/MiscBootInformationFunction.c | 2 +- > > > .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 2 +- > > > .../UefiBootManagerLib/BmDriverHealth.c | 2 +- > > > MdePkg/Include/Library/DebugLib.h | 43 > > > +++++++++++++++-- > > > MdePkg/Include/Library/UnitTestLib.h | 46 > +++++++++---------- > > > MdePkg/Library/BaseLib/SafeString.c | 2 +- > > > NetworkPkg/Include/Library/NetLib.h | 8 ++-- > > > NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 2 +- > > > OvmfPkg/Csm/LegacyBiosDxe/LegacyPci.c | 6 +-- > > > .../PlatformBootManagerLib/BdsPlatform.c | 4 +- > > > .../PlatformBootManagerLibBhyve/BdsPlatform.c | 2 +- > > > .../PlatformBootManagerLibGrub/BdsPlatform.c | 4 +- > > > .../Include/Library/TcgStorageCoreLib.h | 26 +++++------ > > > 19 files changed, 98 insertions(+), 63 deletions(-) > > > > > > -- > > > 2.32.0.windows.1 > > > > >=20 >=20 >=20 >=20 >=20