summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/PDB/module-stats.test
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-08-21 14:53:25 +0000
committerZachary Turner <zturner@google.com>2017-08-21 14:53:25 +0000
commitd1de2f4f5e965d70053b0c0d20d99ad4a105f428 (patch)
treeee90fa721e95e1dfc93217e26d8eeaec8ab1f0a0 /llvm/test/DebugInfo/PDB/module-stats.test
parent48c67c99651d431ec03edc2bdf11abdd24089d2c (diff)
downloadbcm5719-llvm-d1de2f4f5e965d70053b0c0d20d99ad4a105f428.tar.gz
bcm5719-llvm-d1de2f4f5e965d70053b0c0d20d99ad4a105f428.zip
[llvm-pdbutil] Add support for dumping detailed module stats.
This adds support for dumping a summary of module symbols and CodeView debug chunks. This option prints a table for each module of all of the symbols that occurred in the module and the number of times it occurred and total byte size. Then at the end it prints the totals for the entire file. Additionally, this patch adds the -jmc (just my code) option, which suppresses modules which are from external libraries or linker imports, so that you can focus only on the object files and libraries that originate from your own source code. llvm-svn: 311338
Diffstat (limited to 'llvm/test/DebugInfo/PDB/module-stats.test')
-rw-r--r--llvm/test/DebugInfo/PDB/module-stats.test81
1 files changed, 81 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/PDB/module-stats.test b/llvm/test/DebugInfo/PDB/module-stats.test
new file mode 100644
index 00000000000..81787090829
--- /dev/null
+++ b/llvm/test/DebugInfo/PDB/module-stats.test
@@ -0,0 +1,81 @@
+; 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
+
+ALL: Mod 0000 | `d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.obj`:
+ALL-NEXT: Stream 12, 308 bytes
+ALL: Symbols
+ALL-NEXT: Total: 6 entries ( 204 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: S_GPROC32: 1 entries ( 44 bytes)
+ALL-NEXT: S_FRAMEPROC: 1 entries ( 32 bytes)
+ALL-NEXT: S_END: 1 entries ( 4 bytes)
+ALL-NEXT: S_OBJNAME: 1 entries ( 56 bytes)
+ALL-NEXT: S_COMPILE3: 1 entries ( 60 bytes)
+ALL-NEXT: S_BUILDINFO: 1 entries ( 8 bytes)
+ALL: Chunks
+ALL-NEXT: Total: 2 entries ( 88 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: DEBUG_S_FILECHKSMS: 1 entries ( 32 bytes)
+ALL-NEXT: DEBUG_S_LINES: 1 entries ( 56 bytes)
+ALL-NEXT: Mod 0001 | `* Linker *`:
+ALL-NEXT: Stream 14, 520 bytes
+ALL: Symbols
+ALL-NEXT: Total: 13 entries ( 512 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: S_SECTION: 4 entries ( 112 bytes)
+ALL-NEXT: S_ENVBLOCK: 1 entries ( 172 bytes)
+ALL-NEXT: S_TRAMPOLINE: 1 entries ( 20 bytes)
+ALL-NEXT: S_OBJNAME: 1 entries ( 20 bytes)
+ALL-NEXT: S_COMPILE3: 1 entries ( 48 bytes)
+ALL-NEXT: S_COFFGROUP: 5 entries ( 140 bytes)
+ALL: Chunks
+ALL-NEXT: Total: 0 entries ( 0 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: Summary |
+ALL: Symbols
+ALL-NEXT: Total: 19 entries ( 716 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: S_SECTION: 4 entries ( 112 bytes)
+ALL-NEXT: S_GPROC32: 1 entries ( 44 bytes)
+ALL-NEXT: S_ENVBLOCK: 1 entries ( 172 bytes)
+ALL-NEXT: S_FRAMEPROC: 1 entries ( 32 bytes)
+ALL-NEXT: S_TRAMPOLINE: 1 entries ( 20 bytes)
+ALL-NEXT: S_END: 1 entries ( 4 bytes)
+ALL-NEXT: S_OBJNAME: 2 entries ( 76 bytes)
+ALL-NEXT: S_COMPILE3: 2 entries ( 108 bytes)
+ALL-NEXT: S_COFFGROUP: 5 entries ( 140 bytes)
+ALL-NEXT: S_BUILDINFO: 1 entries ( 8 bytes)
+ALL: Chunks
+ALL-NEXT: Total: 2 entries ( 88 bytes)
+ALL-NEXT: --------------------------------------------------------------------------
+ALL-NEXT: DEBUG_S_FILECHKSMS: 1 entries ( 32 bytes)
+ALL-NEXT: DEBUG_S_LINES: 1 entries ( 56 bytes)
+
+ONE-NOT: Mod 0000
+ONE: Mod 0001 | `* Linker *`:
+ONE-NEXT: Stream 14, 520 bytes
+ONE: Symbols
+ONE-NEXT: Total: 13 entries ( 512 bytes)
+ONE-NEXT: --------------------------------------------------------------------------
+ONE-NEXT: S_SECTION: 4 entries ( 112 bytes)
+ONE-NEXT: S_ENVBLOCK: 1 entries ( 172 bytes)
+ONE-NEXT: S_TRAMPOLINE: 1 entries ( 20 bytes)
+ONE-NEXT: S_OBJNAME: 1 entries ( 20 bytes)
+ONE-NEXT: S_COMPILE3: 1 entries ( 48 bytes)
+ONE-NEXT: S_COFFGROUP: 5 entries ( 140 bytes)
+ONE: Chunks
+ONE-NEXT: Total: 0 entries ( 0 bytes)
+ONE-NEXT: --------------------------------------------------------------------------
+ONE-NEXT: Summary |
+ONE: Symbols
+ONE-NEXT: Total: 13 entries ( 512 bytes)
+ONE-NEXT: --------------------------------------------------------------------------
+ONE-NEXT: S_SECTION: 4 entries ( 112 bytes)
+ONE-NEXT: S_ENVBLOCK: 1 entries ( 172 bytes)
+ONE-NEXT: S_TRAMPOLINE: 1 entries ( 20 bytes)
+ONE-NEXT: S_OBJNAME: 1 entries ( 20 bytes)
+ONE-NEXT: S_COMPILE3: 1 entries ( 48 bytes)
+ONE-NEXT: S_COFFGROUP: 5 entries ( 140 bytes)
+ONE: Chunks
+ONE-NEXT: Total: 0 entries ( 0 bytes)
+ONE-NEXT: --------------------------------------------------------------------------
OpenPOWER on IntegriCloud