[PATCH] D52862: DwarfDebug: Pick next location in case of missing location at block begin

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 11:33:17 PDT 2018


vsk added a comment.

In https://reviews.llvm.org/D52862#1255547, @MatzeB wrote:

> In https://reviews.llvm.org/D52862#1255543, @vsk wrote:
>
> > In https://reviews.llvm.org/D52862#1255533, @MatzeB wrote:
> >
> > > In https://reviews.llvm.org/D52862#1255529, @vsk wrote:
> > >
> > > > The core idea and test updates look good to me. I'm curious about the size changes: are you just measuring the size of executables, or of .o's? If it's the former, on Darwin, any size change resulting from this patch might indicate bugs.
> > >
> > >
> > > I measured executable sizes.
> >
> >
> > Ah, ok. Well, we know we have more work to do to eliminate codegen differences with/without debug info. We're planning on discussing this at the debug info BoF. (It's not a blocker for this patch.)
>
>
> The actual instructions are exactly the same, at least in the couple examples I picked.


Hm, I wonder what changed, then.

>>> I tried some flags of `llvm-size` or `llvm-dwarfdump` but could not figure out how to measure the size of the line tables directly...
>> 
>> You can look at the .dSYMs or .o's if you have those around:
>>  $ size -m main.dSYM/Contents/Resources/DWARF/main | grep debug_line
>> 
>>   	Section __debug_line: 60
> 
> There are no .dSYM files around, should there be?

On macOS, typically, yes. You can check whether or not your compiler is doing this with: xcrun clang -g -x c - -o - '-###'. The last step is usually a dsymutil link.

Is it possible that your test harness is removing .dSYMs? .. ah, no, what's happening is that clang declines to add a dsymutil step when it's being used to link .o's into an executable.

Maybe it'd be easier to run measurements on the .o's?

> Example compilation of 1 of the benchmarks:
> 
>   $ /var/tmp/locbase/bin/clang -DNDEBUG  -save-temps=obj   -O0 -g -isysroot /Volumes/XCode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk   -w -Werror=date-time -MD -MT SingleSource/Benchmarks/Misc/CMakeFiles/pi.dir/pi.c.o -MF SingleSource/Benchmarks/Misc/CMakeFiles/pi.dir/pi.c.o.d -o SingleSource/Benchmarks/Misc/CMakeFiles/pi.dir/pi.c.o   -c /Users/mbraun/dev/test-suite/SingleSource/Benchmarks/Misc/pi.c
>   $ /var/tmp/locbase/bin/clang -save-temps=obj   -O0 -g -isysroot /Volumes/XCode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  SingleSource/Benchmarks/Misc/CMakeFiles/pi.dir/pi.c.o  -o SingleSource/Benchmarks/Misc/pi  -Wl,-no_pie -lm


Repository:
  rL LLVM

https://reviews.llvm.org/D52862





More information about the llvm-commits mailing list