llvm/tools/dsymutil
Jonas Devlieghere 9840d7c8db [dsymutil] Reduce peak memory usage for the single threaded execution.
Keeping the compile units in memory is expensive. For the single
threaded case we allocate them in the analyze part and deallocate them
again once we've finished cloning. This poses a problem in the single
threaded case where we did all the analysis first followed by all the
cloning. This meant we had all the link context in memory right after
analyzing finished.

This patch changes the way we order work in the single threaded case.
Instead of doing all the analysis and cloning in serial, we now
interleave the two so we can deallocate the memory as soon as a file is
processed. The result is binary identical and peak memory usage went
down from 13.43GB to 5.73GB for a debug build of trunk clang.

Differential revision: https://reviews.llvm.org/D51618

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341568 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 17:31:59 +00:00
..
BinaryHolder.cpp [dsymutil] Rename conflicting declaration 2018-06-29 17:11:34 +00:00
BinaryHolder.h [dsymutil] Rename conflicting declaration 2018-06-29 17:11:34 +00:00
CFBundle.cpp [dsymutil][NFC] Replace calls to CoreFoundation with LLVM equivalent. 2017-12-28 14:05:49 +00:00
CFBundle.h Add header guards to some headers that are missing them 2018-09-03 16:22:05 +00:00
CMakeLists.txt [dsymutil] Move abstractions into separate files (NFC) 2018-06-27 16:13:40 +00:00
CompileUnit.cpp [dsymutil] Move abstractions into separate files (NFC) 2018-06-27 16:13:40 +00:00
CompileUnit.h Add header guards to some headers that are missing them 2018-09-03 16:22:05 +00:00
DebugMap.cpp [dsymutil] Make the CachedBinaryHolder the default 2018-06-29 16:51:52 +00:00
DebugMap.h [dsymutil] Move abstractions into separate files (NFC) 2018-06-27 16:13:40 +00:00
DeclContext.cpp [dsymutil] Move abstractions into separate files (NFC) 2018-06-27 16:13:40 +00:00
DeclContext.h Add header guards to some headers that are missing them 2018-09-03 16:22:05 +00:00
dsymutil.cpp [dsymutil] Simplify temporary file handling. 2018-07-29 14:56:15 +00:00
dsymutil.h [dsymutil] Make the CachedBinaryHolder the default 2018-06-29 16:51:52 +00:00
DwarfLinker.cpp [dsymutil] Reduce peak memory usage for the single threaded execution. 2018-09-06 17:31:59 +00:00
DwarfLinker.h Reduce the memory footprint of dsymutil. (NFC) 2018-08-24 20:41:08 +00:00
DwarfStreamer.cpp [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
DwarfStreamer.h Add header guards to some headers that are missing them 2018-09-03 16:22:05 +00:00
LinkUtils.h [dsymutil] Add support for generating DWARF5 accelerator tables. 2018-07-25 23:01:38 +00:00
LLVMBuild.txt [dsymutil] Rename llvm-dsymutil -> dsymutil 2018-03-18 11:38:41 +00:00
MachODebugMapParser.cpp [dsymutil] Make the CachedBinaryHolder the default 2018-06-29 16:51:52 +00:00
MachOUtils.cpp [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
MachOUtils.h [dsymutil] Simplify temporary file handling. 2018-07-29 14:56:15 +00:00
NonRelocatableStringpool.cpp [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
NonRelocatableStringpool.h [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00