[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 13:42:18 PDT 2016
zturner updated this revision to Diff 58683.
zturner added a comment.
Updated based on suggestions. With this patch I've deleted `StreamObject` and `StreamString`, and fallen back to raw pointers and `StringRef`s. `MappedBlockStream` uses a `BumpPtrAllocator` to allocate space for contiguous memory only in situations where the read would otherwise have crossed a block boundary.
We also removed many uses of `ByteStream` (a source of memory copying), but a few still remain, in particular with the symbol and type streams since they are more difficult.
I did however get rid of the `ByteStream` used for the module file info array in `DBIStream`, and am using `VarStreamArray` instead, which takes advantage of these zero-copy improvements. This is to show that it works in practice before we move on to applying it to the rest of the streams.
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.58683.patch
Type: text/x-patch
Size: 50531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/ce6a5993/attachment.bin>
More information about the llvm-commits
mailing list