From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1996 invoked by alias); 2 Oct 2014 16:21:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 1980 invoked by uid 89); 2 Oct 2014 16:21:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Oct 2014 16:21:39 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s92GLbD1026235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 2 Oct 2014 12:21:38 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s92GLaVK026041 for ; Thu, 2 Oct 2014 12:21:37 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/4] remote thread listing: get rid of unnecessary "thread alive?" traffic Date: Thu, 02 Oct 2014 16:21:00 -0000 Message-Id: <1412266896-28210-1-git-send-email-palves@redhat.com> X-SW-Source: 2014-10/txt/msg00032.txt.bz2 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\n\n\n\n\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\n\n\n\n\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 gdb/ada-tasks.c | 4 +- gdb/bsd-uthread.c | 6 +- gdb/corelow.c | 2 +- gdb/dec-thread.c | 80 ++++-------- gdb/gdbthread.h | 12 ++ gdb/linux-thread-db.c | 6 +- gdb/nto-procfs.c | 10 +- gdb/obsd-nat.c | 6 +- gdb/procfs.c | 10 +- gdb/ravenscar-thread.c | 10 +- gdb/record-btrace.c | 10 +- gdb/remote.c | 339 +++++++++++++++++++++++++++++-------------------- gdb/sol-thread.c | 21 +-- gdb/target-delegates.c | 22 ++-- gdb/target.c | 4 +- gdb/target.h | 6 +- gdb/thread.c | 8 +- 17 files changed, 301 insertions(+), 255 deletions(-) -- 1.9.3