Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Will Cohen <wcohen@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Slow handling of C++ symbol names
Date: Wed, 19 Nov 2003 21:13:00 -0000	[thread overview]
Message-ID: <20031119211355.GA31069@nevyn.them.org> (raw)
In-Reply-To: <3FBBDC27.50204@redhat.com>

First of all, please use gdb@, not gdb-patches@.

On Wed, Nov 19, 2003 at 04:09:59PM -0500, Will Cohen wrote:
> When debugging some C++ program with gdb (both versions 5.3 and 6.0) it 
> takes a long time to load the debugging information and get a 
> command-line prompt. The particular example that demonstrates this 
> problem is monotone (http://www.venge.net/monotone/) which makes use of 
> the boost libraries (http://www.boost.org/). gdb loading monotone with 
> the associated debugging information takes over 30 seconds to get the 
> initial command-line prompt on a 1.7GHz Athlon with 512MB or DRAM. 
> monotone is not a small program, over 3MB of debugging information. I 
> tooks some measurements with OProfile to find out where gdb 5.3 was 
> spending its time. 3/4 of the time is spent in dyn_string_substring and 
> __GI_strncpy, the column below the '%'. I recompiled gdb with '-pg' to 
> find that this is due to the C++ name demangling. The highlights of 
> gprof output are shown below. I looked at the symbols for monotone/boost 
> in the executable, some of them are VERY long and for monotone/boost 
> they average 147 characters in length. An example of ONE symbol over 2KB 
> is at the end of this mail (there are others like that). I suspect that 
> some of the algorithms used in gdb may not expect such long symbol names 
> and be part of the reason for the slow startup, e.g. work 
> O(length_of_string ^2). Has anyone else noticed this type of problem before?

Have you tried a more recent version of GDB?  This may have been
improved.  Definitely some startup time issues were fixed.

Also, the demangler actually comes from GCC, not GDB.  All we can do is
try to call it less often.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


       reply	other threads:[~2003-11-19 21:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3FBBDC27.50204@redhat.com>
2003-11-19 21:13 ` Daniel Jacobowitz [this message]
2003-11-20 16:09   ` Andrew Cagney
2003-11-20 16:19     ` Daniel Jacobowitz
2003-11-20 16:54       ` Andrew Cagney
2003-11-20 16:58         ` Daniel Jacobowitz
2003-11-21 17:58         ` Daniel Jacobowitz
2003-11-26 14:27           ` Andrew Cagney
2003-11-26 16:24             ` Will Cohen
2003-11-26 20:48               ` Andrew Cagney
2003-11-26 20:45             ` Will Cohen
2003-12-02 22:09 Michael Elizabeth Chastain
2003-12-02 22:23 ` Ian Lance Taylor
2003-12-02 22:29   ` Daniel Jacobowitz
2003-12-03 18:52 ` Andrew Cagney
2003-12-02 22:38 Michael Elizabeth Chastain
2003-12-03 16:48 Michael Elizabeth Chastain
2003-12-03 16:52 ` David Carlton
2003-12-03 16:58 ` Ian Lance Taylor
2003-12-03 17:08   ` Daniel Jacobowitz
2003-12-03 17:34     ` Ian Lance Taylor
2003-12-03 17:38       ` Daniel Jacobowitz
2003-12-03 17:54         ` Ian Lance Taylor
2003-12-03 19:57 Michael Elizabeth Chastain
2003-12-03 20:16 ` Daniel Jacobowitz
2003-12-03 20:14 Michael Elizabeth Chastain
2003-12-03 20:17 Michael Elizabeth Chastain
2003-12-03 20:27 Michael Elizabeth Chastain
2003-12-03 20:35 ` Ian Lance Taylor
2003-12-03 22:30 Michael Elizabeth Chastain

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=20031119211355.GA31069@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=wcohen@redhat.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