1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/DebugInfo
Reid Kleckner f3337db614 [PDB] Defer public serialization until PDB writing
This reduces peak memory on my test case from 1960.14MB to 1700.63MB
(-260MB, -13.2%) with no measurable impact on CPU time. I'm currently
working with a publics stream that is about 277MB. Before this change,
we would allocate 277MB of heap memory, serialize publics into them,
hold onto that heap memory, open the PDB, and commit into it.  After
this change, we defer the serialization until commit time.

In the last change I made to public writing, I re-sorted the list of
publics multiple times in place to avoid allocating new temporary data
structures. Deferring serialization until later requires that we don't
reorder the publics. Instead of sorting the publics, I partially
construct the hash table data structures, store a publics index in them,
and then sort the hash table data structures. Later, I replace the index
with the symbol record offset.

This change also addresses a FIXME and moves the list of global and
public records from GSIHashStreamBuilder to GSIStreamBuilder. Now that
publics aren't being serialized, it makes even less sense to store them
as a list of CVSymbol records. The hash table used to deduplicate
globals is moved as well, since that is specific to globals, and not
publics.

Reviewed By: aganea, hans

Differential Revision: https://reviews.llvm.org/D81296
2020-06-30 11:28:04 -07:00
..
CodeView [CodeView] Add TypeCollection::replaceType to replace type records post-merging 2020-06-18 09:17:14 -04:00
DWARF [DebugInfo/DWARF] - Do not hang when CFI are truncated. 2020-06-23 14:39:24 +03:00
GSYM [Object] Change ObjectFile::getSymbolValue() return type to Expected<uint64_t> 2020-05-02 14:04:44 +08:00
MSF Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
PDB [PDB] Defer public serialization until PDB writing 2020-06-30 11:28:04 -07:00
Symbolize Re-land "Migrate the rest of COFFObjectFile to Error" 2020-06-11 14:46:16 -07:00
CMakeLists.txt Add GSYM utility files along with unit tests. 2019-06-26 14:09:09 +00:00
LLVMBuild.txt Fix build in shared lib mode. 2019-06-26 15:46:48 +00:00