Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC/patch] Sort global symbols in psymtabs only if needed
Date: Mon, 11 Feb 2008 17:43:00 -0000	[thread overview]
Message-ID: <47B08936.7080909@qnx.com> (raw)
In-Reply-To: <20080211164335.GA15268@caradoc.them.org>

Daniel Jacobowitz wrote:
> On Mon, Feb 11, 2008 at 11:19:46AM -0500, Aleksandar Ristovski wrote:
>> The attached patch sorts on first lookup instead of on load.
> 
> Does this help if you benchmark any non-trivial debug sessions?
> You've sped up startup, but the first call to lookup_symbol is going
> to search a large number of such psymtabs.
The full price will probably be paid with longer debug sessions, but it 
definitely improves time to "stopped in main".

> 
> Also, you probably know this, but be careful using gprof for this sort
> of thing.  I recommend oprofile.  gprof artificially inflates the cost
> of small frequent functions like strcmp_iw_ordered, because of all the
> overhead.
No, the delay really comes from there, I used wall-clock timings as well, but 
thought this is more representative.
> 
> The patch may still be a good idea.  Can we eliminate the binary
> search / sort entirely?  We do hash table lookups for full symtabs;
> that should be faster than sorting.  See dict_create_hashed.
> 
> Those are all hardwired to "struct symbol" at the moment.  But
> I think it only uses SYMBOL_SEARCH_NAME, so it could work with
> psymbols too if we passed the ginfo around.
> 
> 
I haven't investigated this, but I will take a look... So we would only hash and 
use hash lookup for both psymtabs and symtabs. It sounds to me as something doable.




      reply	other threads:[~2008-02-11 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 16:20 Aleksandar Ristovski
2008-02-11 16:43 ` Daniel Jacobowitz
2008-02-11 17:43   ` Aleksandar Ristovski [this message]

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=47B08936.7080909@qnx.com \
    --to=aristovski@qnx.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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