From: Pedro Alves <pedro@codesourcery.com>
To: Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] Improve performance with lots of shared libraries
Date: Wed, 12 Oct 2011 16:16:00 -0000 [thread overview]
Message-ID: <201110121715.42088.pedro@codesourcery.com> (raw)
In-Reply-To: <20111012155918.GA4216@redhat.com>
On Wednesday 12 October 2011 16:59:18, Gary Benson wrote:
> Pedro Alves wrote:
> > To make this generic for all breakpoints/stops, what I have in mind
> > would be:
> >
> > - at breakpoint creation or re-set time, check if the locations
> > we've created point at inlined code, and set a flag in the
> > breakpoint's locations. We know the location is inlined or not
> > from the debug info. Breakpoint creation is the slow path, so
> > that's okay.
> >
> > - given that we need to single-step over those breakpoints, we also
> > need to know whether the PC after stepping over those breakpoints
> > points at inlined code. I think we can still do that at
> > breakpoint creation or re-set time. We'd need to reuse the
> > software single-step machinery to know where the single-step
> > would take us, and record somewhere that those locations point to
> > inline code or not. We'd also check this list in
> > stopped_at_non_inline_function. The software single-step
> > machinery would need some cleaning up to make this possible.
> > It's interface, gdbarch_software_single_step, isn't fit for this.
> > The gdbarch hook should return a list of locations where to put
> > the breakpoint, instead of implementations planting the
> > breakpoints themselves, which would be a nice cleanup for other
> > things too. We'd also need to implement this hook for x86. It's
> > not implemented currently because x86 can do hardware
> > single-stepping.
>
> Ah, nice! Would it be appropriate to file a bug containing this
> information? So it doesn't get lost before I have a chance to work
> on it?
Sure! What I haven't thought about much is whether this
optimization would be indeed a general win. :-) It'd make a
difference if you tend to have planted breakpoints that
don't cause a stop often (e.g., some python breakpoint),
and maybe it'd make a difference on software single-step
targets, and a tiny bit on handling step-resume
breakpoints on hardware step targets? I don't have a clear
picture where time is being spent (other than roundtripping
to the target). Thread event breakpoints sound like low
hang fruit though.
--
Pedro Alves
prev parent reply other threads:[~2011-10-12 16:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 17:35 [RFA] " Gary Benson
2011-10-04 10:25 ` PING: " Gary Benson
2011-10-04 20:19 ` Tom Tromey
2011-10-07 15:02 ` Pedro Alves
2011-10-10 11:58 ` Gary Benson
2011-10-11 15:53 ` [RFA take 2] " Gary Benson
2011-10-11 16:53 ` Pedro Alves
2011-10-12 15:59 ` [commit] " Gary Benson
2011-10-12 16:16 ` Pedro Alves [this message]
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=201110121715.42088.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gbenson@redhat.com \
--cc=gdb-patches@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