Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jean-Marc Saffroy <saffroy@gmail.com>
Cc: Frederic RISS <frederic.riss@st.com>, gdb@sourceware.org
Subject: Re: gdb script performance
Date: Thu, 05 Oct 2006 15:37:00 -0000	[thread overview]
Message-ID: <20061005153704.GA1864@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610051724280.9250@erda.mds>

On Thu, Oct 05, 2006 at 05:29:30PM +0200, Jean-Marc Saffroy wrote:
> On Thu, 5 Oct 2006, Daniel Jacobowitz wrote:
> 
> >If you would like to see if further improvement is possible, you should
> >build a GDB with profiling enabled (--enable-profiling at configure
> >time), and use the maint set profile command to get a profile; then
> >post exact data from it.
> 
> Please find attached gprof output (this is with gdb 6.5 + 
> gdb-lookup-internal-first-3.patch running the lsmaps script I posted 
> earlier).
> 
> Thanks for helping!

 26.14    381.31   381.31   141867     2.69     3.50  find_pc_sect_psymtab
 18.54    651.82   270.51   331876     0.82     0.82  find_pc_sect_section
 17.88    912.69   260.87 144847060     0.00     0.00  lookup_partial_symbol
 11.01   1073.33   160.64 1254595136     0.00     0.00  strcmp_iw
  4.98   1145.97    72.64    34010     2.14    16.50  lookup_symbol_aux_psymtabs
  4.78   1215.73    69.75     9584     7.28     8.12  fixup_section
  4.46   1280.79    65.06                             lbasename
  3.42   1330.64    49.85    12183     4.09     4.09  lookup_partial_symtab
  1.83   1357.34    26.70 33844664     0.00     0.00  strcmp_iw_ordered
  1.68   1381.82    24.48 1288426966     0.00     0.00  symbol_natural_name
  1.09   1397.71    15.89 1288426966     0.00     0.00  symbol_search_name

Well then.  Observations:
  - We're looking up partial symbols way too often.
  - It's taking way too long.
  - And oh my lord is that a lot of calls to the (fairly inefficient)
    strcmp_iw.

It looks like only about three calls to find_pc_sect_psymtab per
expression evaluation, which is bad but not too bad - sounds like
a last-searched-item cache may be useful.

(To be clear: I don't have time to work on this just now.)

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-10-05 15:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 12:16 Jean-Marc Saffroy
2006-10-05 12:59 ` Frederic RISS
2006-10-05 13:28   ` Jean-Marc Saffroy
2006-10-05 13:32     ` Daniel Jacobowitz
2006-10-05 15:31       ` Jean-Marc Saffroy
2006-10-05 15:37         ` Daniel Jacobowitz [this message]
2006-11-29  2:47           ` Jean-Marc Saffroy

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=20061005153704.GA1864@nevyn.them.org \
    --to=drow@false.org \
    --cc=frederic.riss@st.com \
    --cc=gdb@sourceware.org \
    --cc=saffroy@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