[llvm] [DwarfDump] Add new set of line-table-related statistics to llvm-dwarfdump (PR #93289)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 08:59:51 PDT 2024


================
@@ -1043,6 +1113,16 @@ bool dwarfdump::collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx,
   printLocationStats(J, "#local vars", LocStats.LocalVarLocStats);
   printLocationStats(J, "#local vars - entry values",
                      LocStats.LocalVarNonEntryValLocStats);
+
+  // Print line statistics for the object file.
+  printDatum(J, "#bytes with line information", LnStats.NumBytes.Value);
+  printDatum(J, "#bytes with line-0 locations", LnStats.NumLineZeroBytes.Value);
+  printDatum(J, "#line entries", LnStats.NumEntries.Value);
+  printDatum(J, "#line entries marked is_stmt", LnStats.NumIsStmtEntries.Value);
----------------
OCHyams wrote:

```suggestion
  printDatum(J, "#line entries (is_stmt)", LnStats.NumIsStmtEntries.Value);
```
More in keeping with lines below?

https://github.com/llvm/llvm-project/pull/93289


More information about the llvm-commits mailing list