[PATCH] D52194: [ELF] Keep GdbIndexSection::Symbols non-flattened to avoid allocating large vector

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 15:09:13 PDT 2018


MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.

createSymbols reserved a large vector to flatten parallelly computed table chunks.
We can keep the non-flattened form to avoid the allocation.

This decreases maximum resident set size a bit (by NumSymbols*sizeof(GdbIndex),
which is ~100M for a test case that would take 21.8GiB RSS). The change
does not make code more complicated so I think it is still worthwhile.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52194

Files:
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52194.165838.patch
Type: text/x-patch
Size: 4637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/2d183054/attachment.bin>


More information about the llvm-commits mailing list