public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guomin Jiang" <guomin.jiang@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch to save the binary size
Date: Mon, 21 Feb 2022 01:30:40 +0000	[thread overview]
Message-ID: <BN0PR11MB5696F650D822DFBA73A1EC4A9D3A9@BN0PR11MB5696.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CO1PR11MB49290AB7FF86DE80781FAEE5D2379@CO1PR11MB4929.namprd11.prod.outlook.com>

Comment inline

Thank
Guomin

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Friday, February 18, 2022 11:34 AM
> To: devel@edk2.groups.io; Jiang, Guomin <guomin.jiang@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch to save the
> binary size
> 
> Guomin,
> 
> I think there is a cleaner solution to this problem using compiler flags to
> change the contents of the __FILE__ macro.

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.

> 
> 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 using
> these techniques can guarantee the same binaries are produced when the
> path to WORKSPACE is different on different build systems.
>

 
> Does your change provide a module-relative, package-relative, or
> workspace-relative file path in the ASSERT()?

No, I only use filename to replace the __FILE__

> 
> How does ASSERT() in autogen work?
> 

It is need to do some POC.

> Thanks,
> 
> Mike
> 
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <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=3840
> >
> > 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 locate 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
> >
> >
> >
> > 
> >


  reply	other threads:[~2022-02-21  1:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  2:30 [PATCH 0/2] Reduce the ASSERT patch to save the binary size Guomin Jiang
2022-02-18  2:30 ` [PATCH 1/2] BaseTools/Conf: " Guomin Jiang
2022-02-28  9:52   ` Bob Feng
2022-03-01  0:47     ` Guomin Jiang
2022-02-18  2:30 ` [PATCH 2/2] MdePkg/Include: Define new DEBUG_FILE to specify path Guomin Jiang
2022-02-18  3:33 ` [edk2-devel] [PATCH 0/2] Reduce the ASSERT patch to save the binary size Michael D Kinney
2022-02-21  1:30   ` Guomin Jiang [this message]
2022-03-01  1:47     ` 回复: " gaoliming
     [not found] ` <16D4C08DC1603ADF.6551@groups.io>
2022-02-24  2:33   ` [edk2-devel] [PATCH 2/2] MdePkg/Include: Define new DEBUG_FILE to specify path Guomin Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN0PR11MB5696F650D822DFBA73A1EC4A9D3A9@BN0PR11MB5696.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox