This is the mail archive of the
rda@sourceware.org
mailing list for the rda project.
Re: [RFC] Improve performance of multi-threaded debugging
- From: Jim Blandy <jimb at redhat dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: rda at sources dot redhat dot com
- Date: Fri, 16 Sep 2005 13:12:17 -0700
- Subject: Re: [RFC] Improve performance of multi-threaded debugging
- References: <20050914150439.5a86df49@ironwood.lan>
Kevin Buettner <kevinb@redhat.com> writes:
> 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.
>
> Comments?
Couldn't this be done dynamically? That is, there are variables in
there that indicate whether we're using the signal-based model,
wherein I think we really do have to re-fetch the thread list all the
time, or the libthread_db-event-based model; wherein we don't.