From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: MI: performance of getting stack arguments
Date: Thu, 20 Apr 2006 08:50:00 -0000 [thread overview]
Message-ID: <20060419124032.GA9524@nevyn.them.org> (raw)
In-Reply-To: <200604191020.08044.ghost@cs.msu.su>
On Wed, Apr 19, 2006 at 10:20:07AM +0400, Vladimir Prus wrote:
> It's specifically the -stack-list-arguments command that takes 600ms. The
> separately issued -stack-list-frames takes 150ms which is not fast either,
> but not as bad as -stack-list-arguments.
OK, there is probably something absurdly stupid going on then.
> > If it's the arguments,
> > we may be able to improve it. Maybe build a debuggable GDB and "maint
> > set profile"?
>
> Sure. What's the right way to build debuggable GDB, setting CFLAGS=-g during
> configure or something else?
Two ways. You can use --enable-profiling as Eli suggested, which will
let you get callgraphs, or you can just use a binary built with the
default CFLAGS (-O2 -g), and "maint set profile". You have to use
gprof --no-graph on the output file to get output if you do that. I
still find it useful - e.g. the numbers I posted to dmi-discuss
yesterday came from that. Its advantage is that it doesn't inflate
small functions as badly.
> I though about it and it might work, assuming that "-stack-list-arguments 1
> 100 110" won't take too much time to get to frame 100. I think getting to
> frame 100 should be fast, since nothing should be printed, but will need to
> check.
It should be instant. That'll just walk the cached list of frames - as
long as nothing is invalidating the frame cache! (One of the more
likely stupid things to be happening).
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-04-19 12:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 16:40 Vladimir Prus
2006-04-18 16:45 ` Daniel Jacobowitz
2006-04-18 21:15 ` Jim Ingham
2006-04-19 7:55 ` Vladimir Prus
2006-04-19 16:13 ` Eli Zaretskii
2006-04-20 8:50 ` Daniel Jacobowitz [this message]
2006-04-26 14:10 ` Vladimir Prus
2006-04-26 14:59 ` Daniel Jacobowitz
2006-04-26 18:02 ` Vladimir Prus
2006-04-26 18:17 ` Daniel Jacobowitz
2006-04-18 19:11 ` Jim Ingham
2006-04-18 21:35 ` Robert Dewar
2006-04-18 21:37 ` Jim Ingham
2006-04-19 6:08 ` Robert Dewar
2006-04-19 7:30 ` Vladimir Prus
2006-04-19 6:11 ` Nick Roberts
2006-04-19 8:45 ` Eli Zaretskii
2006-04-19 9:02 ` Nick Roberts
2006-04-19 12:40 ` Eli Zaretskii
2006-04-20 10:22 ` Jim Ingham
2006-04-19 6:20 ` Vladimir Prus
2006-04-19 8:28 ` Eli Zaretskii
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=20060419124032.GA9524@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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