Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Nick Savoiu <savoiu@ics.uci.edu>
Cc: gdb@sources.redhat.com
Subject: Re: Improving GDB startup time with large programs
Date: Tue, 04 May 2004 19:44:00 -0000	[thread overview]
Message-ID: <20040504194421.GA17015@nevyn.them.org> (raw)
In-Reply-To: <200405021948.50571.savoiu@ics.uci.edu>

On Sun, May 02, 2004 at 07:48:50PM -0700, Nick Savoiu wrote:
> >> How do I profile gdb?
> >
> >When you build gdb, configure as normal.
> >Then use this command to build:
> 
> Here's what I got (the most significant stuff) with g++ 3.2. Seems
> that the number of symbols is the culprit.

First of all, as Andrew said, use something like oprofile instead of
gprof / -pg profiling.  The top three functions on your profile below
are called extremely often and do extremely little work -> call graph
profiling inflates their time significantly.

Secondly, the big change in the 6.0 / 6.1 profiles you've posted is the
increased use of strcmp_iw_ordered.  David Carlton noticed that this
change was in fact necessary for correctness.  I've been thinking about
alternate approaches to avoid it - the comparison is quite expensive -
but it's going to take a lot of work.

Third, most of the time in your example is spent reading partial
symbols.  If you use a GCC new enough to support
-g -feliminate-dwarf2-dups, and a GDB snapshot from the
"drow_intercu-20040221-branch" branch of CVS, there will be many fewer
partial symbols; that should improve your startup time somewhat.

-- 
Daniel Jacobowitz


  parent reply	other threads:[~2004-05-04 19:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-02 22:49 Michael Elizabeth Chastain
2004-05-02 23:11 ` Nick Savoiu
2004-05-03  2:49 ` Nick Savoiu
2004-05-03 17:17   ` Nick Savoiu
2004-05-04 19:44   ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-05-03  3:39 Michael Elizabeth Chastain
2004-05-03  1:56 Michael Elizabeth Chastain
2004-05-03 15:00 ` Andrew Cagney
2004-05-02 22:12 Nick Savoiu

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=20040504194421.GA17015@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=savoiu@ics.uci.edu \
    /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