From: Joel Brobecker <brobecker@adacore.com>
To: gdb@sourceware.org
Subject: Re: More info on PR/9711 (quadratic slowdown for deep stack traces)
Date: Wed, 02 Sep 2009 16:24:00 -0000 [thread overview]
Message-ID: <20090902162402.GQ4379@adacore.com> (raw)
In-Reply-To: <20090902114303.GA30223@caradoc.them.org>
> This almost, almost works. I can see two problems:
>
> * Can the results of those checks ever change? For instance, does
> "set backtrace past-main off" flush the stack frame? If not, it won't
> take effect right away after this change.
Yes - that's one of the issues I knew about. It wasn't making sense
to redo the checks in the case of finding the frame from its ID,
but I suppose it would make sense for "bt" to stop after we "set
"backtrace past-main off".
I suppose we could immediately flush the extra frames when the setting
changes to "off", but on the other hand, I think that the right thing
to do in frame_find_by_id is to call get_prev_frame_1 anyway. I will
test that next.
> Have frame_find_by_id keep a cache with the same lifetime as
> current_frame. If it saves the last frame it returned, we can try
> that frame and the previous frame before going on to searching from
> the current frame.
That's a good idea. It seems relatively easy to do, since I can see
that the current_frame is always reset to NULL through
reinit_frame_cache, so it should be easy to have the same lifetime
as the frame chain. I will see if I can implement that too.
--
Joel
next prev parent reply other threads:[~2009-09-02 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 20:48 Joel Brobecker
2009-09-02 3:42 ` Paul Pluzhnikov
2009-09-02 4:52 ` Joel Brobecker
2009-09-02 4:57 ` Paul Pluzhnikov
2009-09-02 11:43 ` Daniel Jacobowitz
2009-09-02 16:24 ` Joel Brobecker [this message]
2009-09-03 18:40 ` Joel Brobecker
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=20090902162402.GQ4379@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@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