This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] symbol lookup cache
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Thu, 4 Dec 2014 20:15:59 +0100
- Subject: Re: [RFC] symbol lookup cache
- Authentication-results: sourceware.org; auth=none
- References: <yjt2y4qrlqwa dot fsf at ruffy dot mtv dot corp dot google dot com>
On Mon, 01 Dec 2014 09:23:49 +0100, Doug Evans wrote:
> ..gdb_index helps speed things up for one objfile,
> but when there are 100s (or 1000s) of shared
> libraries, symbol lookup can still take awhile,
> even with .gdb_index.
> [I'm setting aside a planned change to basic
> symbol lookup to use the index better.
> We'll still, I think, want a cache even
> with that change.]
While I have no numbers personally I do not think GDB would still need a cache
after that change.
"Accelerate lookup_symbol_aux_objfile 85x" is so fast in a fraction of second
because it traverses 146426 symtabs. So 146426 is OK but 1979341 was not (it
was in some way more than 1979341 before you refactored symtabs).
I was considering in the past to have some merged .gdb_index for all the
shared libraries used by some app on disk (not just in memory). But that
makes sense for HDD but less for SSD with the regular ~100 libraries. While
it make more sense for Google 1000+ libraries I am not sure if Google always
uses the same set of 1000+ libraries for a given app.
Jan