diff options
author | Zachary Turner <zturner@google.com> | 2017-08-31 20:43:22 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-08-31 20:43:22 +0000 |
commit | 99c6982bcd8f2990db560e580f7909827f62deef (patch) | |
tree | 3692e511435b2d43da71be6fe8fbbbd0e406efc8 /llvm/test/DebugInfo/PDB | |
parent | 80523182871bf867d553cdfbdac3d09c9cc2a0ff (diff) | |
download | bcm5719-llvm-99c6982bcd8f2990db560e580f7909827f62deef.tar.gz bcm5719-llvm-99c6982bcd8f2990db560e580f7909827f62deef.zip |
[llvm-pdbutil] Print detailed S_UDT stats.
This adds a new command line option, -udt-stats, which breaks
down the stats of S_UDT records. These are one of the biggest
contributors to the size of /DEBUG:FASTLINK PDBs, so they need
some additional tools to be able to analyze their usage. This
option will dig into each S_UDT record and determine what kind
of record it points to, and then break down the statistics by
the target type. The goal here is to identify how our object
files differ from MSVC object files in S_UDT records, so that
we can output fewer of them and reach size parity.
llvm-svn: 312276
Diffstat (limited to 'llvm/test/DebugInfo/PDB')
-rw-r--r-- | llvm/test/DebugInfo/PDB/module-stats.test | 4 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/udt-stats.test | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/llvm/test/DebugInfo/PDB/module-stats.test b/llvm/test/DebugInfo/PDB/module-stats.test index 81787090829..c2c58339ae0 100644 --- a/llvm/test/DebugInfo/PDB/module-stats.test +++ b/llvm/test/DebugInfo/PDB/module-stats.test @@ -1,5 +1,5 @@ -; RUN: llvm-pdbutil dump -mod-stats %p/Inputs/empty.pdb | FileCheck --check-prefix=ALL %s -; RUN: llvm-pdbutil dump -mod-stats -modi=1 %p/Inputs/empty.pdb | FileCheck --check-prefix=ONE %s +; RUN: llvm-pdbutil dump -sym-stats %p/Inputs/empty.pdb | FileCheck --check-prefix=ALL %s +; RUN: llvm-pdbutil dump -sym-stats -modi=1 %p/Inputs/empty.pdb | FileCheck --check-prefix=ONE %s ALL: Mod 0000 | `d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.obj`: ALL-NEXT: Stream 12, 308 bytes diff --git a/llvm/test/DebugInfo/PDB/udt-stats.test b/llvm/test/DebugInfo/PDB/udt-stats.test new file mode 100644 index 00000000000..0ffda9c3008 --- /dev/null +++ b/llvm/test/DebugInfo/PDB/udt-stats.test @@ -0,0 +1,15 @@ +; RUN: llvm-pdbutil dump -udt-stats %p/Inputs/big-read.pdb | FileCheck %s + +CHECK: S_UDT Record Stats +CHECK-NEXT: ============================================================ +CHECK: Record Kind | Count Size +CHECK-NEXT: ----------------------------- +CHECK-NEXT: LF_ENUM | 3 188 +CHECK-NEXT: LF_POINTER | 39 468 +CHECK-NEXT: LF_UNION | 1 52 +CHECK-NEXT: <simple type> | 43 0 +CHECK-NEXT: LF_PROCEDURE | 1 16 +CHECK-NEXT: LF_STRUCTURE | 27 1,788 +CHECK-NEXT: ----------------------------- +CHECK-NEXT: Total (S_UDT) | 114 2,604 +CHECK-NEXT: ----------------------------- |