[PATCH] D20654: [pdb] Try super hard to conserve memory in llvm-pdbdump
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 17:30:48 PDT 2016
zturner updated this revision to Diff 58724.
zturner added a comment.
Updated based on suggestions. Now can return cross-block references as long as the referenced blocks are contiguous. Also got a big memory savings by not reading the entire names buffer in the `NameHashTable` class as a giant `StringRef`. Instead I now just treat it as a `StreamRef` and read individual streams from it.
With this patch across all streams of a 9MB PDB, the total amount of memory copied is less than 1,000 bytes.
http://reviews.llvm.org/D20654
Files:
include/llvm/DebugInfo/CodeView/ByteStream.h
include/llvm/DebugInfo/CodeView/StreamArray.h
include/llvm/DebugInfo/CodeView/StreamInterface.h
include/llvm/DebugInfo/CodeView/StreamReader.h
include/llvm/DebugInfo/CodeView/StreamRef.h
include/llvm/DebugInfo/PDB/Raw/DbiStream.h
include/llvm/DebugInfo/PDB/Raw/MappedBlockStream.h
include/llvm/DebugInfo/PDB/Raw/ModInfo.h
include/llvm/DebugInfo/PDB/Raw/ModStream.h
include/llvm/DebugInfo/PDB/Raw/NameHashTable.h
include/llvm/DebugInfo/PDB/Raw/PublicsStream.h
include/llvm/DebugInfo/PDB/Raw/TpiStream.h
lib/DebugInfo/CodeView/ByteStream.cpp
lib/DebugInfo/CodeView/StreamReader.cpp
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/Raw/DbiStream.cpp
lib/DebugInfo/PDB/Raw/InfoStream.cpp
lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp
lib/DebugInfo/PDB/Raw/ModInfo.cpp
lib/DebugInfo/PDB/Raw/ModStream.cpp
lib/DebugInfo/PDB/Raw/NameHashTable.cpp
lib/DebugInfo/PDB/Raw/NameMap.cpp
lib/DebugInfo/PDB/Raw/PublicsStream.cpp
lib/DebugInfo/PDB/Raw/SymbolStream.cpp
lib/DebugInfo/PDB/Raw/TpiStream.cpp
tools/llvm-pdbdump/llvm-pdbdump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20654.58724.patch
Type: text/x-patch
Size: 52095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/8a50f67b/attachment.bin>
More information about the llvm-commits
mailing list