This is the mail archive of the
rda@sourceware.org
mailing list for the rda project.
Re: [RFC] Improve performance of multi-threaded debugging
On Wed, 14 Sep 2005 18:08:51 -0400
Daniel Jacobowitz <drow@false.org> wrote:
> On Wed, Sep 14, 2005 at 03:04:39PM -0700, Kevin Buettner wrote:
> > As things stand now, the thread list is fetched each time rda checks
> > the status of the program. This doesn't sound like such a burden until
> > you realize that some decent sized data structures are read via the
> > ptrace() interface. On slower machines, it can take a significant amount
> > of time to single step or continue primarily due to this overhead.
> >
> > The patch below fetches the thread list only when it knows for certain
> > that something has changed.
> >
> > The only fly in the ointment is that the signal based event model only
> > knows about thread creation, but not about thread death. So it won't
> > catch thread death until some new thread is created. I'm not sure
> > what the implications of this are in practice.
>
> You may run a risk of not noticing when a thread is destroyed
> and then a new thread is created with the same thread ID - which NPTL
> does all the time.
>
> Other than that I haven't looked at rda enough to comment. I'm not
> sure what you mean about not knowing about thread death; you ought to
> be notified about thread death (A) via TD_* and (B) via wait, except on
> some broken RH 2.4 kernels.
I have the TD_ case taken care of. My patch didn't address the wait() case
though.
Thanks for your comments!
Kevin