[PATCH] D58271: [ELF] --gdb-index: split off GdbSymbol::CuVector and add a separate CuVectors

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 20:53:54 PST 2019


MaskRay created this revision.
MaskRay added reviewers: ruiu, echristo.
Herald added subscribers: llvm-commits, jdoerfert, arphaman, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

These GdbSymbol::CuVector cause memory allocation and cost lots of
memory. This patch splits off the field and add a separate CuVectors to
be more memory efficient.

For one of our large internal targets, there are 4791276 symbols and the
sum of size (eapacity) of GdbSymbol::CuVector is 19740000 (26185902).

Before: 24.820 seconds, 13.74GiB
After:  24.175 seconds, 13.21GiB

As a comparison,
/usr/bin/gold (Debian): 134.29 seconds, 12.04GiB
lld --no-gdb-index: 20.619 seconds, 9.12GiB


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D58271

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58271.186959.patch
Type: text/x-patch
Size: 6557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190215/e0585535/attachment.bin>


More information about the llvm-commits mailing list