llvm/tools
Zachary Turner 0212bc82e0 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 01:54:44 +00:00
..
bugpoint [GlobalDCE, Misc] Don't remove functions referenced by ifuncs 2016-05-04 00:20:48 +00:00
bugpoint-passes Remove autoconf support 2016-01-26 21:29:08 +00:00
dsymutil dsymutil/modules: Reword the warning for static libraries without module caches 2016-05-20 20:36:06 +00:00
gold [ThinLTO/gold] Handle bitcode archives 2016-05-26 01:46:41 +00:00
llc Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
lli [Orc] Merge some common code for creating CompileCallbackManagers and 2016-05-26 17:20:35 +00:00
llvm-ar Fix bug where temporary file would be left behind every time an archive was updated. 2016-05-09 13:31:11 +00:00
llvm-as Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-as-fuzzer Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-bcanalyzer [ThinLTO] Use valueid instead of bitcode offsets in combined index file 2016-04-27 13:28:35 +00:00
llvm-c-test [llvm-c] Expose LLVMContextGetDiagnostic{Handler,Context} 2016-04-08 09:19:02 +00:00
llvm-config llvm-config: fix --libs on Linux 2016-03-14 21:39:58 +00:00
llvm-cov Retry^3 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC" 2016-05-19 03:54:45 +00:00
llvm-cxxdump Add FIXMEs to all derived classes of std::error_category. 2016-05-24 20:13:46 +00:00
llvm-diff [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dis Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-dwarfdump [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dwp llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs 2016-05-25 23:37:06 +00:00
llvm-extract Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-go Remove autoconf support 2016-01-26 21:29:08 +00:00
llvm-jitlistener Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-link ThinLTO/ModuleLinker: add a flag to not always pull-in linkonce when performing importing 2016-04-21 01:59:39 +00:00
llvm-lto Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
llvm-mc Don't pass a Reloc::Model to MC. 2016-05-18 11:58:50 +00:00
llvm-mc-fuzzer [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and FuzzerDriver() 2016-05-13 10:23:04 +00:00
llvm-mcmarkup Remove autoconf support 2016-01-26 21:29:08 +00:00
llvm-nm Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
llvm-objdump [CMake] Restrict libxar linkage to just llvm-objdump 2016-05-26 16:32:40 +00:00
llvm-pdbdump [codeview,pdb] Try really hard to conserve memory when reading. 2016-05-27 01:54:44 +00:00
llvm-profdata [profile] show more statistics 2016-05-23 16:36:11 +00:00
llvm-readobj Remove unused global variable. 2016-05-24 20:48:18 +00:00
llvm-rtdyld Thread Expected<...> up from libObject’s getType() for symbols to allow llvm-objdump to produce a good error message. 2016-05-02 20:28:12 +00:00
llvm-shlib Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets" 2016-05-26 04:35:35 +00:00
llvm-size Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
llvm-split Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-stress [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-symbolizer Remove autoconf support 2016-01-26 21:29:08 +00:00
lto Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
msbuild MSBuild integration: fix the loop in install.bat 2014-09-30 22:30:06 +00:00
obj2yaml [obj2yaml][yaml2obj] Support for MachO lazy bindings 2016-05-26 21:29:39 +00:00
opt [ARM, AArch64] Properly initialize InterleavedAccessPass 2016-05-19 20:08:32 +00:00
sancov Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
sanstats Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
verify-uselistorder [GlobalDCE, Misc] Don't remove functions referenced by ifuncs 2016-05-04 00:20:48 +00:00
xcode-toolchain [CMake] [Xcode] Improving Xcode toolchain generation to support distribution targets 2016-04-29 22:19:35 +00:00
yaml2obj [obj2yaml][yaml2obj] Support for MachO lazy bindings 2016-05-26 21:29:39 +00:00
CMakeLists.txt Remove leftover 2016-04-29 15:08:05 +00:00
LLVMBuild.txt llvm-dwp: Initial layout 2015-12-01 00:48:34 +00:00