[PATCH] D49887: [DebugInfo] Add basic support for DWARF5 call site-related attributes

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 17:04:24 PDT 2018


vsk updated this revision to Diff 157810.
vsk added a comment.

- Gate call site info on -mllvm -callsite-debuginfo-experimental (off by default).
- Add verifier checks for TAG_call_site. ResolveĀ verifier issues found during stage2 testing.

Here are the dSYM sizes I see in RelWithDebInfo (-O2 -g) stage2 builds of clang:

| Build                                 | Total dSYM Size     | Subprogram Count | Call Site Entries |
| Baseline                              | 1,053,275,396 bytes | 336,411          | 0                 |
| -callsite-debuginfo-experimental=true | 1,066,904,289       | 343,838          | 82,399            |
|

There's a 1.3% increase in the overall size of the dSYM (13MB). 94% of that increase (12.3MB) is due to a size increase in the .debug_info section. The other 6% is distributed across other debugging sections.

It looks like the bulk of the size increase comes from forward-declarations of subprograms in DW_AT_call_origin. One take-away is that it might be more efficient (albeit non-conformant) to use mangled names inside of DW_AT_call_origin.

I experimented with emitting one TAG_call_site per callsite and found that this roughly doubles the number of entries (to 176,087). If we were to add return PC information to each entry, on net this would just add ~5MB to the final dSYM. This is a lot less than I expected.


https://reviews.llvm.org/D49887

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGDebugInfo.h
  clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
  llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
  llvm/include/llvm/IR/DebugInfoFlags.def
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
  llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/DebugInfo/Generic/dwarf-callsite-related-attrs.ll
  llvm/test/DebugInfo/X86/dwarfdump-callsite-invalid-1.s
  llvm/tools/llvm-dwarfdump/Statistics.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49887.157810.patch
Type: text/x-patch
Size: 45745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180728/fa91ed32/attachment.bin>


More information about the llvm-commits mailing list