[Lldb-commits] [PATCH] D62634: Improve DWARF parsing and accessing by 1% to 2%

Paul Robinson via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 3 09:15:09 PDT 2019

probinson added a comment.

In D62634#1527575 <https://reviews.llvm.org/D62634#1527575>, @dblaikie wrote:

> This is intentional behavior in clang (controllable under the -f[no-]split-dwarf-inlining flag, and modified by the -f[no-]debug-info-for-profiling flag).
> This extra debug info is used for online symbolication (in the absence of .dwo files) - such as for the sanitizers (accurate symbolication is necessary for correctness in msan, due to msan's necessary use of blacklisting to avoid certain false positives) and some forms of sample based profiling collection.
> In the default mode, clang includes, as you noted, just the subprograms that have inlined subroutines in them in this split-dwarf-inlining data.
>  In -fdebug-info-for-profiling all subprograms are described in the skeleton CU with some minimal attributes (they don't need parameters, local variables/scopes, etc) necessary to do certain profile things I don't know lots about.

I think we have to tolerate the msan part.  However, the profile feedback workflow could (should) surely be taught to read a .dwo file.  The point of -fdebug-info-for-profiling was so you don't have to emit limited/full debug info in the .o file just to make profiling work; but if you're using split DWARF then you're doing limited/full anyway, and the feedback loop happens in the context of a build environment so the .dwo can be asserted to be available.  So in split DWARF mode, we should not be emitting debug-info-for-profiling into the skeleton.

> Chances are it's probably best for a debugger to ignore these entries.

This stuff is going to show up in the wild, so yeah.  You know you're looking at a skeleton, so don't bother looking at any children.



More information about the lldb-commits mailing list