[PATCH] D65178: WIP: [DWARF] Collect statistics for DW_OP_entry_value
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 08:18:46 PDT 2019
> On Jul 23, 2019, at 9:31 PM, Eric Christopher <echristo at gmail.com> wrote:
>
> I guess? I'm curious what we'd get out of it in general? Is the
> thought that we could try to classify how often we have to do more
> work to recover parameters? Not against it, just trying to see why :)
I’d like to get the percentage of parameters guaranteed to have an available location.
I think this should correlate with backtrace quality (if not, that’s interesting too, maybe it means the debugger has bugs).
Counting entry_value descriptions is a starting point, but I think you’d need to check that the ranges in a parameter location description span the whole function to finish the patch.
As-is, I thought “# entry values” could be fun to look at as the callsiteparam work lands.
vedant
> On Tue, Jul 23, 2019 at 5:27 PM Vedant Kumar via Phabricator
> <reviews at reviews.llvm.org> wrote:
>>
>> vsk created this revision.
>> Herald added subscribers: hiraditya, aprantl.
>> Herald added a project: LLVM.
>>
>> It might be interesting to see how many parameters with entry_value locations there are compared to how many parameters-with-location there are overall.
>>
>> I can clean up this patch and push it forward if there's general interest. Here are some numbers from a stage2 RelAsserts build of clang.
>>
>> ~/src/builds/llvm-project-master-stage2-RA (0) $ ../llvm-project-master-RA/bin/llvm-dwarfdump --statistics ./bin/clang.dSYM | ppjson
>> { 'call site entries': 6113835,
>> 'file': 'bin/clang.dSYM/Contents/Resources/DWARF/clang',
>> 'formal params with binary location': 5928235,
>> 'formal params with binary location containing entry value': 0,
>> 'formal params with source location': 4200769,
>> 'formal params with type': 8436986,
>> 'format': 'Mach-O 64-bit x86-64',
>> 'inlined funcs with abstract origins': 5859344,
>> 'inlined functions': 5859344,
>> 'scope bytes covered': 563026378,
>> 'scope bytes total': 969630990,
>> 'source functions': 468524,
>> 'source functions with location': 468075,
>> 'source variables': 10246465,
>> 'total formal params': 8436986,
>> 'total function size': 65502932,
>> 'total inlined function size': 48065586,
>> 'total vars': 1142370,
>> 'unique source variables': 1408162,
>> 'variables with location': 6751342,
>> 'vars with binary location': 710703,
>> 'vars with source location': 1059166,
>> 'vars with type': 1142370,
>> 'version': 3}
>>
>> (with -femit-debug-entry-values)
>> ~/src/builds/param-entry-vals-stage2 (0) $ ../llvm-project-master-RA/bin/llvm-dwarfdump --statistics ./bin/clang.dSYM | ppjson
>> { 'call site entries': 6471968,
>> 'file': 'bin/clang.dSYM/Contents/Resources/DWARF/clang',
>> 'formal params with binary location': 5928218,
>> 'formal params with binary location containing entry value': 70017,
>> 'formal params with source location': 4200754,
>> 'formal params with type': 8437413,
>> 'format': 'Mach-O 64-bit x86-64',
>> 'inlined funcs with abstract origins': 5859331,
>> 'inlined functions': 5859331,
>> 'scope bytes covered': 580573865,
>> 'scope bytes total': 969629704,
>> 'source functions': 468520,
>> 'source functions with location': 468071,
>> 'source variables': 10246437,
>> 'total formal params': 8437413,
>> 'total function size': 65502621,
>> 'total inlined function size': 48065442,
>> 'total vars': 1142364,
>> 'unique source variables': 1408152,
>> 'variables with location': 6751217,
>> 'vars with binary location': 710704,
>> 'vars with source location': 1059160,
>> 'vars with type': 1142364,
>> 'version': 3}
>>
>>
>> https://reviews.llvm.org/D65178
>>
>> Files:
>> llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
>> llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
>> llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
>> llvm/tools/llvm-dwarfdump/Statistics.cpp
>>
More information about the llvm-commits
mailing list