forked from OSchip/llvm-project
5931b4e5b5
DWARF v5 introduces DW_AT_call_all_calls, a subprogram attribute which indicates that all calls (both regular and tail) within the subprogram have call site entries. The information within these call site entries can be used by a debugger to populate backtraces with synthetic tail call frames. Tail calling frames go missing in backtraces because the frame of the caller is reused by the callee. Call site entries allow a debugger to reconstruct a sequence of (tail) calls which led from one function to another. This improves backtrace quality. There are limitations: tail recursion isn't handled, variables within synthetic frames may not survive to be inspected, etc. This approach is not novel, see: https://gcc.gnu.org/wiki/summit2010?action=AttachFile&do=get&target=jelinek.pdf This patch adds an IR-level flag (DIFlagAllCallsDescribed) which lowers to DW_AT_call_all_calls. It adds the minimal amount of DWARF generation support needed to emit standards-compliant call site entries. For easier deployment, when the debugger tuning is LLDB, the DWARF requirement is adjusted to v4. Testing: Apart from check-{llvm, clang}, I built a stage2 RelWithDebInfo clang binary. Its dSYM passed verification and grew by 1.4% compared to the baseline. 151,879 call site entries were added. rdar://42001377 Differential Revision: https://reviews.llvm.org/D49887 llvm-svn: 343883 |
||
---|---|---|
.. | ||
ARMException.cpp | ||
AccelTable.cpp | ||
AddressPool.cpp | ||
AddressPool.h | ||
AsmPrinter.cpp | ||
AsmPrinterDwarf.cpp | ||
AsmPrinterHandler.h | ||
AsmPrinterInlineAsm.cpp | ||
ByteStreamer.h | ||
CMakeLists.txt | ||
CodeViewDebug.cpp | ||
CodeViewDebug.h | ||
DIE.cpp | ||
DIEHash.cpp | ||
DIEHash.h | ||
DIEHashAttributes.def | ||
DbgEntityHistoryCalculator.cpp | ||
DbgEntityHistoryCalculator.h | ||
DebugHandlerBase.cpp | ||
DebugHandlerBase.h | ||
DebugLocEntry.h | ||
DebugLocStream.cpp | ||
DebugLocStream.h | ||
DwarfCFIException.cpp | ||
DwarfCompileUnit.cpp | ||
DwarfCompileUnit.h | ||
DwarfDebug.cpp | ||
DwarfDebug.h | ||
DwarfException.h | ||
DwarfExpression.cpp | ||
DwarfExpression.h | ||
DwarfFile.cpp | ||
DwarfFile.h | ||
DwarfStringPool.cpp | ||
DwarfStringPool.h | ||
DwarfUnit.cpp | ||
DwarfUnit.h | ||
EHStreamer.cpp | ||
EHStreamer.h | ||
ErlangGCPrinter.cpp | ||
LLVMBuild.txt | ||
OcamlGCPrinter.cpp | ||
WinCFGuard.cpp | ||
WinCFGuard.h | ||
WinException.cpp | ||
WinException.h |