[PATCH] D59672: [pdb] Add -type-stats and sort stats by descending size
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 06:50:33 PDT 2019
aganea added a comment.
This is what I'm seeing for a large PDB (2 GB). Things are a bit different from your use-case:
Type Record Stats
============================================================
Types
Total: 7050382 entries ( 536,798,320 bytes, 76.14 avg)
--------------------------------------------------------------------------
LF_FIELDLIST: 369709 entries ( 116,277,336 bytes, 314.51 avg)
LF_VFTABLE: 48428 entries ( 106,221,244 bytes, 2193.38 avg)
LF_STRUCTURE: 502958 entries ( 92,283,348 bytes, 183.48 avg)
LF_MFUNCTION: 2699622 entries ( 75,589,416 bytes, 28.00 avg)
LF_CLASS: 323609 entries ( 72,441,564 bytes, 223.86 avg)
LF_ENUM: 122798 entries ( 24,322,364 bytes, 198.07 avg)
LF_POINTER: 1262870 entries ( 15,468,832 bytes, 12.25 avg)
LF_ARGLIST: 794482 entries ( 12,368,496 bytes, 15.57 avg)
LF_METHODLIST: 462337 entries ( 11,367,124 bytes, 24.59 avg)
LF_UNION: 29152 entries ( 4,260,840 bytes, 146.16 avg)
LF_PROCEDURE: 236117 entries ( 3,777,872 bytes, 16.00 avg)
LF_MODIFIER: 189660 entries ( 2,275,920 bytes, 12.00 avg)
LF_ARRAY: 7766 entries ( 124,912 bytes, 16.08 avg)
LF_VTSHAPE: 175 entries ( 10,668 bytes, 60.96 avg)
LF_BITFIELD: 698 entries ( 8,376 bytes, 12.00 avg)
LF_LABEL: 1 entries ( 8 bytes, 8.00 avg)
================
Comment at: llvm/test/DebugInfo/PDB/udt-stats.test:12
CHECK-NEXT: LF_PROCEDURE | 1 16
-CHECK-NEXT: LF_STRUCTURE | 27 1,788
+CHECK-NEXT: <simple type> | 43 0
CHECK-NEXT: -----------------------------
----------------
Why is <simple type> zero size?
================
Comment at: llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp:339
std::string KindName = formatModuleDetailKind(Kind(K.first));
- P.formatLine("{0,40}: {1,7} entries ({2,8} bytes)", KindName,
+ P.formatLine("{0,40}: {1,7} entries ({2,8:N} bytes)", KindName,
K.second.Count, K.second.Size);
----------------
Would you mind increasing {1,7} to {1,8} and {2,8:N} to {2,10:N} please? The output is offsetted on my end:
```
S_UNAMESPACE: 45458 entries ( 904548 bytes)
S_REGREL32: 4138872 entries (115147908 bytes)
S_LOCAL: 2487396 entries (57712788 bytes)
```
================
Comment at: llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp:702
+ StatCollection TypeStats;
+ auto &Types = File.types();
+ for (Optional<TypeIndex> TI = Types.getFirst(); TI; TI = Types.getNext(*TI)) {
----------------
Rui says no `auto` in LLD (when the type isn't obvious), is that a policy that should apply everywhere in LLVM?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59672/new/
https://reviews.llvm.org/D59672
More information about the llvm-commits
mailing list