[PATCH] D16135: Macro Debug Info support in Clang

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 14:43:14 PST 2017


> On Feb 8, 2017, at 2:31 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Wed, Feb 8, 2017 at 2:25 PM Amjad Aboud via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> aaboud added a comment.
> 
> > How much does the build directory grow?
> >  Is there any noticeable compile time regression?
> 
> I build clang in release mode using GCC, then used that build to build clang in debug mode with "-fstandalone-debug" flag, one time with my changes and another time without my changes.
> 
> Without my changes
> ------------------
> 
> Clang executable Size: 1,565MB
> Build time: 17m57.504s
> 
> Withmy changes
> --------------
> 
> Clang executable Size: 2,043MB
> Build time:  17m58.008s
> 
> Do, build time is the same, but binary size was increased about 30%.
> However, remember that we are emitting macro debug info in dwarf4 format, once we support emitting it in dwarf5 format the size should be reduced significantly.

That sounds like we shouldn't be enabling it by default at -gdwarf-4; and we can revisit that decision for -gdwarf-5 whenever it is ready.

> 
> How are you measuring the build time? Total time for, say "ninja clang" with full parallelism? That'd be hard to measure the actual impact (since it could be the link time or other things are dominating, etc). If you have a reliable way to time (I'm assuming Intel has lots of tools for measuring compiler performance) the compilation, get a sense of the variance, etc (& link time, to get a sense of how much the larger inputs affect linker performance) would be useful.
> 
> But I'm not too fussed if no one else is worried (not sure which, if any platforms other than your own, are planning to turn this on by default so people might not be too invested in it). (wouldn't mind some second opinions, etc)
>  
> 
> > I'm not sure it makes sense to motivate this feature with "-fstandalone-debug" flag.
> 
> Is "-fmacro-debug" flag sounds good?
> 
> Sounds alright to me.

Personally I find "-fmacro-debug-info" to be more descriptive, but "-fmacro-debug" mirrors "-fstandalone-debug", so I'm fine with that too. We could also use "-fdebug-macro" for symmetry with "-fdebug-type-section". Does GCC have a command line option for this that we could mirror?
Please don't forget to document the new option in the man page and user guide.

-- adrian

>  
> Should we extend DebugInfoKind enumeration to support the debug info macro? Or we should add a new option to CodeGenOptions?
> 
> Separate option - it should be orthogonal to standalone/no-standalone, for example.
>  
> 
> 
> https://reviews.llvm.org/D16135 <https://reviews.llvm.org/D16135>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170208/fb26dbdc/attachment-0001.html>


More information about the cfe-commits mailing list