[PATCH] D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 16:22:13 PDT 2019


rnk created this revision.
rnk added reviewers: zturner, aganea.
Herald added subscribers: jdoerfert, arphaman, hiraditya, mgorny.
Herald added a project: LLVM.

This considers module symbol streams and the global symbol stream to be
roots. Most types that this considers "unreferenced" are referenced by
LF_UDT_MOD_SRC_LINE id records, which VC seems to always include.
Essentially, they are types that the user can only find in the debugger
if they call them by name, they cannot be found by traversing a symbol.

In practice, around 80% of type information in a PDB is referenced by a
symbol. That seems like a reasonable number.

I don't really plan to do anything with this tool. It mostly just exists
for informational purposes, and to confirm that we probably don't need
to implement type reference tracking in LLD. We can continue to merge
all types as we do today without wasting space.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D59620

Files:
  llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
  llvm/test/DebugInfo/PDB/pdb-type-ref-stats.test
  llvm/tools/llvm-pdbutil/CMakeLists.txt
  llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
  llvm/tools/llvm-pdbutil/DumpOutputStyle.h
  llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp
  llvm/tools/llvm-pdbutil/MinimalTypeDumper.h
  llvm/tools/llvm-pdbutil/TypeReferenceTracker.cpp
  llvm/tools/llvm-pdbutil/TypeReferenceTracker.h
  llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
  llvm/tools/llvm-pdbutil/llvm-pdbutil.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59620.191601.patch
Type: text/x-patch
Size: 60061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/c337ccee/attachment.bin>


More information about the llvm-commits mailing list