[PATCH] D59797: [COFF] Reorder fields in Chunk and SectionChunk to reduce their size
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 14:54:10 PDT 2019
rnk added a comment.
In D59797#1442250 <https://reviews.llvm.org/D59797#1442250>, @aganea wrote:
> > @rnk wrote:
> > This reduces the total size of all LLD heap allocations by 5.22%
>
> What is the total heap size before/after? What percentage of that heap size is used by Chunks? How many of them do you have?
I used the VS memory profiling tool and used the type view to see the most commonly allocated types. "void" just means allocations whose type wasn't determined, and a lot of it comes from vectors, specifically the new `RelocTargets` vector @mstorsjo added.
Before:
heap usage: 176,077 KB
type count size
lld-link.exe!lld::coff::SectionChunk 370,809 71,195,328
void 251,990 63,254,440
lld-link.exe!lld::coff::Symbol[] 444,020 24,865,120
lld-link.exe!lld::coff::DefinedRegular 379,729 18,226,992
char[] 249 1,233,585
After:
heap usage: 167,335 KB
type |count |byte size
---------------------------------------|---------------|-------------
void |251,990 |63,254,440
lld-link.exe!lld::coff::SectionChunk |370,809 |62,295,912
lld-link.exe!lld::coff::Symbol[] |444,020 |24,865,120
lld-link.exe!lld::coff::DefinedRegular |379,729 |18,226,992
char[] |249 |1,233,585
5.22% heap usage reduction
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59797/new/
https://reviews.llvm.org/D59797
More information about the llvm-commits
mailing list