1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib/DebugInfo/CodeView
Zachary Turner f070dd590e [codeview,pdb] Try really hard to conserve memory when reading.
PDBs can be extremely large.  We're already mapping the entire
PDB into the process's address space, but to make matters worse
the blocks of the PDB are not arranged contiguously.  So, when
we have something like an array or a string embedded into the
stream, we have to make a copy.  Since it's convenient to use
traditional data structures to iterate and manipulate these
records, we need the memory to be contiguous.

As a result of this, we were using roughly twice as much memory
as the file size of the PDB, because every stream was copied
out and re-stitched together contiguously.

This patch addresses this by improving the MappedBlockStream
to allocate from a BumpPtrAllocator only when a read requires
a discontiguous read.  Furthermore, it introduces some data
structures backed by a stream which can iterate over both
fixed and variable length records of a PDB.  Since everything
is backed by a stream and not a buffer, we can read almost
everything from the PDB with zero copies.

Differential Revision: http://reviews.llvm.org/D20654
Reviewed By: ruiu

llvm-svn: 270951
2016-05-27 01:54:44 +00:00
..
ByteStream.cpp [codeview,pdb] Try really hard to conserve memory when reading. 2016-05-27 01:54:44 +00:00
CMakeLists.txt [codeview] Move StreamInterface and StreamReader to libcodeview. 2016-05-25 20:37:03 +00:00
CodeViewError.cpp [codeview] Move StreamInterface and StreamReader to libcodeview. 2016-05-25 20:37:03 +00:00
FieldListRecordBuilder.cpp [codeview] Add type stream merging prototype 2016-05-14 00:02:53 +00:00
Line.cpp
ListRecordBuilder.cpp
LLVMBuild.txt
MemoryTypeTableBuilder.cpp
MethodListRecordBuilder.cpp [codeview] Align class and print names of types 2016-05-13 19:37:07 +00:00
RecordSerialization.cpp Make CodeView record serialization more generic. 2016-05-12 17:45:44 +00:00
StreamReader.cpp [codeview,pdb] Try really hard to conserve memory when reading. 2016-05-27 01:54:44 +00:00
SymbolDumper.cpp [codeview] Add support for S_EXPORT symbol. 2016-05-25 00:12:40 +00:00
TypeDumper.cpp [codeview] Add support for new types and symbols. 2016-05-25 00:12:48 +00:00
TypeRecord.cpp [codeview] Add support for new types and symbols. 2016-05-25 00:12:48 +00:00
TypeRecordBuilder.cpp [codeview] Add type stream merging prototype 2016-05-14 00:02:53 +00:00
TypeStreamMerger.cpp [codeview] Test serialization of all known type records 2016-05-17 16:20:35 +00:00
TypeTableBuilder.cpp [codeview] Add type stream merging prototype 2016-05-14 00:02:53 +00:00