From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <xdje42@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patchv2 2/2] Accelerate lookup_symbol_aux_objfile 14.5x [Re: [patch 0/2] Accelerate symbol lookups 15x]
Date: Fri, 24 Oct 2014 07:33:00 -0000 [thread overview]
Message-ID: <20141024073308.GA20087@host2.jankratochvil.net> (raw)
In-Reply-To: <CAP9bCMTrzU7srWLfiS2814nfBEySJ-i6yKy7AKHBvXbUoLa-rQ@mail.gmail.com>
On Fri, 24 Oct 2014 09:16:01 +0200, Doug Evans wrote:
> One thought I have is that significant changes at a higher level will
> minimize the impact of this patch. One change I'm thinking of making
> is replacing iterating over every symbol table and then if that fails
> going to the index with instead just going straight to the index: the
> index knows where the symbols are (you mentioned this as well).
Yes, I tried that first.
For the performance testcase I provided the issue is in
lookup_symbol_global_iterator_cb():
data->result = lookup_symbol_aux_objfile (objfile, GLOBAL_BLOCK,
data->name, data->domain);
if (data->result == NULL)
data->result = lookup_symbol_aux_quick (objfile, GLOBAL_BLOCK,
data->name, data->domain);
Changing their order does not fix the performance as lookup_symbol_aux_quick()
(that is quick_symbol_functions::lookup_symbol) can return NULL
* either if the symbol is really not present in the index.
* or if the symbol's symtab is already expanded.
For the latter case (commonly happening) quick_symbol_functions::lookup_symbol
finds the right symtab but then it drops that information.
Changing the quick_symbol_functions::lookup_symbol semantics may fix it.
But then it will get fixed only for .gdb_index files while my two patches also
improve performance of non-.gdb_index files.
For each objfile .gdb_index presence is orthogonal to DWZ application.
Sure a question remains if we should care about performance of non-.gdb_index
files at all. Even for continuous edit-build-debug cycles it is worth to run
gdb-add-index during each build.
> If we were to go this route (and apologies for the delay), can you
> write a routine like lookup_block_symbol which does the above and call
> that here instead?
OK.
Jan
next prev parent reply other threads:[~2014-10-24 7:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 21:44 [patch 0/2] Accelerate symbol lookups 15x Jan Kratochvil
2014-10-22 8:55 ` Doug Evans
2014-10-23 18:24 ` [patchv2 2/2] Accelerate lookup_symbol_aux_objfile 14.5x [Re: [patch 0/2] Accelerate symbol lookups 15x] Jan Kratochvil
2014-10-24 7:16 ` Doug Evans
2014-10-24 7:33 ` Jan Kratochvil [this message]
2014-10-24 16:07 ` Doug Evans
2014-10-27 5:55 ` Doug Evans
2014-10-27 6:02 ` Doug Evans
2014-10-27 8:54 ` Jan Kratochvil
2014-11-29 12:11 ` [patchv3 2/2] Accelerate lookup_symbol_aux_objfile 85x Jan Kratochvil
2014-12-02 3:07 ` Doug Evans
2014-12-03 18:05 ` Jan Kratochvil
2014-12-04 6:21 ` Doug Evans
2014-12-04 7:27 ` [commit] " Jan Kratochvil
2014-10-22 8:57 ` [patch 0/2] Accelerate symbol lookups 15x Doug Evans
2014-10-24 7:19 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141024073308.GA20087@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox