diff options
| author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-09 11:33:56 +0000 |
|---|---|---|
| committer | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-09 11:33:56 +0000 |
| commit | 01eaae6dd12862cda6b42d565a215b07a178aba6 (patch) | |
| tree | 1100521e1eb7dce0a791709349f96a9efa16e432 /llvm/tools/llvm-dwarfdump/Statistics.cpp | |
| parent | 9b3f38f99085e2bbf9db01bb00d4c6d837f0fc00 (diff) | |
| download | bcm5719-llvm-01eaae6dd12862cda6b42d565a215b07a178aba6.tar.gz bcm5719-llvm-01eaae6dd12862cda6b42d565a215b07a178aba6.zip | |
[DwarfDebug] Dump call site debug info
Dump the DWARF information about call sites and call site parameters into
debug info sections.
The patch also provides an interface for the interpretation of instructions
that could load values of a call site parameters in order to generate DWARF
about the call site parameters.
([13/13] Introduce the debug entry values.)
Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>
Differential Revision: https://reviews.llvm.org/D60716
llvm-svn: 365467
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/Statistics.cpp')
| -rw-r--r-- | llvm/tools/llvm-dwarfdump/Statistics.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/llvm/tools/llvm-dwarfdump/Statistics.cpp b/llvm/tools/llvm-dwarfdump/Statistics.cpp index f26369b935c..c76c77edb90 100644 --- a/llvm/tools/llvm-dwarfdump/Statistics.cpp +++ b/llvm/tools/llvm-dwarfdump/Statistics.cpp @@ -56,9 +56,12 @@ struct GlobalStats { /// Total number of PC range bytes in each variable's enclosing scope, /// starting from the first definition of the variable. unsigned ScopeBytesFromFirstDefinition = 0; - /// Total number of call site entries (DW_TAG_call_site) or - /// (DW_AT_call_file & DW_AT_call_line). + /// Total number of call site entries (DW_AT_call_file & DW_AT_call_line). unsigned CallSiteEntries = 0; + /// Total number of call site DIEs (DW_TAG_call_site). + unsigned CallSiteDIEs = 0; + /// Total number of call site parameter DIEs (DW_TAG_call_site_parameter). + unsigned CallSiteParamDIEs = 0; /// Total byte size of concrete functions. This byte size includes /// inline functions contained in the concrete functions. uint64_t FunctionSize = 0; @@ -94,8 +97,15 @@ static void collectStatsForDie(DWARFDie Die, std::string FnPrefix, uint64_t BytesCovered = 0; uint64_t OffsetToFirstDefinition = 0; - if (Die.getTag() == dwarf::DW_TAG_call_site) { - GlobalStats.CallSiteEntries++; + if (Die.getTag() == dwarf::DW_TAG_call_site || + Die.getTag() == dwarf::DW_TAG_GNU_call_site) { + GlobalStats.CallSiteDIEs++; + return; + } + + if (Die.getTag() == dwarf::DW_TAG_call_site_parameter || + Die.getTag() == dwarf::DW_TAG_GNU_call_site_parameter) { + GlobalStats.CallSiteParamDIEs++; return; } @@ -387,6 +397,8 @@ bool collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx, printDatum(OS, "source variables", VarParamTotal); printDatum(OS, "variables with location", VarParamWithLoc); printDatum(OS, "call site entries", GlobalStats.CallSiteEntries); + printDatum(OS, "call site DIEs", GlobalStats.CallSiteDIEs); + printDatum(OS, "call site parameter DIEs", GlobalStats.CallSiteParamDIEs); printDatum(OS, "scope bytes total", GlobalStats.ScopeBytesFromFirstDefinition); printDatum(OS, "scope bytes covered", GlobalStats.ScopeBytesCovered); |

