[PATCH] D59672: [pdb] Add -type-stats and sort stats by descending size

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 15:16:04 PDT 2019


rnk created this revision.
rnk added reviewers: aganea, zturner.
Herald added a project: LLVM.

It prints this on chromium browser_tests.exe.pdb:

  Types
           Total: 5647475 entries ( 371,897,512 bytes,   65.85 avg)
  --------------------------------------------------------------------------
        LF_CLASS:  397894 entries ( 119,537,780 bytes,  300.43 avg)
    LF_STRUCTURE:  236351 entries (  83,208,084 bytes,  352.05 avg)
    LF_FIELDLIST:  291003 entries (  66,087,920 bytes,  227.10 avg)
    LF_MFUNCTION: 1884176 entries (  52,756,928 bytes,   28.00 avg)
      LF_POINTER: 1149030 entries (  13,877,344 bytes,   12.08 avg)
      LF_ARGLIST:  789980 entries (  12,436,752 bytes,   15.74 avg)
   LF_METHODLIST:  361498 entries (   8,351,008 bytes,   23.10 avg)
         LF_ENUM:   16069 entries (   6,108,340 bytes,  380.13 avg)
    LF_PROCEDURE:  269374 entries (   4,309,984 bytes,   16.00 avg)
     LF_MODIFIER:  235602 entries (   2,827,224 bytes,   12.00 avg)
        LF_UNION:    9131 entries (   2,072,168 bytes,  226.94 avg)
      LF_VFTABLE:     323 entries (     207,784 bytes,  643.29 avg)
        LF_ARRAY:    6639 entries (     106,380 bytes,   16.02 avg)
      LF_VTSHAPE:     126 entries (       6,472 bytes,   51.37 avg)
     LF_BITFIELD:     278 entries (       3,336 bytes,   12.00 avg)
        LF_LABEL:       1 entries (           8 bytes,    8.00 avg)

The PDB is overall 1.9GB, so the LF_CLASS and LF_STRUCTURE declarations
account for about 10% of the overall file size. I was surprised to find
that on average LF_FIELDLIST records are short. Maybe this is because
there are many more types with short member lists than there are
instantiations with lots of members, like std::vector.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D59672

Files:
  llvm/test/DebugInfo/PDB/module-stats.test
  llvm/test/DebugInfo/PDB/type-stats.test
  llvm/test/DebugInfo/PDB/udt-stats.test
  llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
  llvm/tools/llvm-pdbutil/DumpOutputStyle.h
  llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
  llvm/tools/llvm-pdbutil/llvm-pdbutil.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59672.191789.patch
Type: text/x-patch
Size: 16720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190321/95187b60/attachment.bin>


More information about the llvm-commits mailing list