This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[pushed] Re: [PATCH 0/4] remote thread listing: get rid of unnecessary "thread alive?" traffic
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 15 Oct 2014 23:01:30 +0100
- Subject: [pushed] Re: [PATCH 0/4] remote thread listing: get rid of unnecessary "thread alive?" traffic
- Authentication-results: sourceware.org; auth=none
- References: <1412266896-28210-1-git-send-email-palves at redhat dot com>
On 10/02/2014 05:21 PM, Pedro Alves wrote:
> When GDB wants to sync the thread list with the target's (e.g., due to
> "info threads"), it ends up sending a bunch of T (thread alive?)
> packets before fetching the current remote thread list:
>
> Sending packet: $Tp2141.2150#82...Packet received: OK
> Sending packet: $Tp2141.214f#b7...Packet received: OK
> Sending packet: $Tp2141.2141#82...Packet received: OK
> Sending packet: $qXfer:threads:read::0,fff#03...Packet received: l<threads>\n<thread id="p2141.2141" core="2"/>\n<thread id="p2141.214f" core="1"/>\n<thread id="p2141.2150" core="2"/>\n</threads>\n
>
> That's wasteful, given that we can tell whether a thread is gone from
> the fact that it won't appear in the list returned by
> qXfer:threads:read (or qfThreadInfo/qsThreadInfo, or qL).
>
> This series eliminates those unnecessary queries.
>
> IOW, after this series, the above becomes simply:
>
> Sending packet: $qXfer:threads:read::0,fff#03...Packet received: l<threads>\n<thread id="p2141.2141" core="2"/>\n<thread id="p2141.214f" core="1"/>\n<thread id="p2141.2150" core="2"/>\n</threads>\n
>
> Pedro Alves (4):
> Merge remote thread listing methods
> Push pruning old threads down to the target
> remote: get rid of all the T packets when synching the thread list
> DEC threads: Simplify updating the thread list
I've now pushed this.
Thanks,
Pedro Alves