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

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 01:15:07 PDT 2019


On Mon, Mar 11, 2019 at 5:42 PM Rui Ueyama via Phabricator
<reviews at reviews.llvm.org> wrote:
>
> ruiu added a comment.
>
> (I'm sorry, I sent it prematurely.)
>
> That is my perception too; it seems nearly impossible to reduce the memory usage without sacrificing speed. If memory consumption is a problem for most users, we probably should choose memory reduction over speed, but I don't think our use case within Google is strong enough to change that design choice. In lld, we parallelize things if we are handling a massive number of the same kind of objects, and this perfectly matches that pattern. It'd be pretty odd if we don't do this only this place.
>

Ultimately this is a scaling problem. Partially in lld and partially
in how linker created gdb index is constructed. Ultimately there are
just a lot of strings associated with a debug index and sharing those
would help immensely, however, that's not how the gnu
pubnames/pubtypes sections were designed. An alternate way of looking
at it is that linker constructed gdb indexes are rare enough in the
wild that we could slow this down and no one would notice. :)

> Fortunately there is a workaround for it: we could build a binary without --gdb-index and then add it using gdb as a post-processing. Maybe we should live with that.

FWIW serializing in this way is far slower than if we made lld single
threaded :)

Thoughts?

-eric


More information about the llvm-commits mailing list