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.3515.1646099257198874044 for ; Mon, 28 Feb 2022 17:47:38 -0800 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 ; Tue, 01 Mar 2022 09:47:32 +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: , , "'Kinney, Michael D'" References: <20220218023008.1347-1-guomin.jiang@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDAvMl0gUmVkdWNlIHRoZSBBU1NFUlQgcGF0Y2ggdG8gc2F2ZSB0aGUgYmluYXJ5IHNpemU=?= Date: Tue, 1 Mar 2022 09:47:33 +0800 Message-ID: <02cd01d82d0e$524a9040$f6dfb0c0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGhhkY0Mjr2RzNHWmlXUFpdT8yHtwIlXVPLA2w1AyKs6nxbsA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Guomin: I add my comments.=20 > -----=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 Guomin Jiang > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B42=E6=9C=8821=E6=97=A5 = 9:31 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Kinney, Michael D ; > devel@edk2.groups.io > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch = to save the > binary size >=20 > Comment inline >=20 > Thank > Guomin >=20 > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Friday, February 18, 2022 11:34 AM > > To: devel@edk2.groups.io; Jiang, Guomin ; > Kinney, > > Michael D > > Subject: RE: [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch to save t= he > > binary size > > > > Guomin, > > > > I think there is a cleaner solution to this problem using compiler flag= s to > > change the contents of the __FILE__ macro. >=20 > Thanks for your information. It is useful. > 1. From the link, it seem that the VS haven't support it yet. > 2. From my though, It is not good solution that we have strong depend on > compiler. Why do you think the compiler option is not good option? If the compiler su= pports such option,=20 it will reduce the customization in Edk2 BaseTools.=20 >=20 > > > > https://blog.conan.io/2019/09/02/Deterministic-builds-with-C-C++.html > > https://reproducible-builds.org/docs/build-path/ > > https://developercommunity.visualstudio.com/t/map-file-to-a-relative- > > path/1393881 > > > > I found this content when I was working on the CompareBuild tool and us= ing > > these techniques can guarantee the same binaries are produced when the > > path to WORKSPACE is different on different build systems. > > >=20 >=20 > > Does your change provide a module-relative, package-relative, or > > workspace-relative file path in the ASSERT()? >=20 > No, I only use filename to replace the __FILE__ This solution changes FILE from full path to file name. It can reduce the i= mage size.=20 But, it loses the file path information. If the developer doesn't care the = image size,=20 how does he enable the full patch file information in ASSERT? >=20 > > > > How does ASSERT() in autogen work? > > >=20 > It is need to do some POC. ASSERT works in autogen.c. But, the different modules have the same AutoGen= .c file.=20 If ASSERT happens in AutoGen.c, only AutoGen.c print in debug message. The = developer=20 may not know which this AutoGen.c is from. =20 Thanks Liming >=20 > > Thanks, > > > > Mike > > > > > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of > > Guomin > > > Jiang > > > Sent: Thursday, February 17, 2022 6:30 PM > > > To: devel@edk2.groups.io > > > Subject: [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch to save the > > > binary size > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3840 > > > > > > 1. Use DEBUG_FILE to control ASSERT path 2. Default use file name as > > > ASSERT path > > > > > > Motivation and Goal: > > > 1. The path will occupy many size in DEBUG build when file path is > > > long 2. We hope can reduce the size but not impact the debug > > > capability 3. If only use filename, we can search the filename to loc= ate file. > > It > > > can save many size meanwhile. > > > > > > Guomin Jiang (2): > > > BaseTools/Conf: Reduce the ASSERT patch to save the binary size > > > MdePkg/Include: Define new DEBUG_FILE to specify path. > > > > > > BaseTools/Conf/build_rule.template | 10 ++++---- > > > MdePkg/Include/Library/DebugLib.h | 39 > +++++++++++++++++++++------ > > --- > > > 2 files changed, 33 insertions(+), 16 deletions(-) > > > > > > -- > > > 2.35.1.windows.2 > > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20