From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29783 invoked by alias); 26 Dec 2014 20:31:30 -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 29774 invoked by uid 89); 26 Dec 2014 20:31:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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; Fri, 26 Dec 2014 20:31:28 +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 sBQKVQcV006913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 26 Dec 2014 15:31:26 -0500 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 sBQKVG2n011395 for ; Fri, 26 Dec 2014 15:31:21 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/8] Linux: starvation avoidance in non-stop mode Date: Fri, 26 Dec 2014 20:31:00 -0000 Message-Id: <1419625871-28848-1-git-send-email-palves@redhat.com> X-SW-Source: 2014-12/txt/msg00631.txt.bz2 I've been working on reimplementing all-stop behavior against a target backend working in non-stop mode. Running the testsuite against that shows a few regressions related to thread starvation. The Linux backends (gdb and gdbserver) already have logic in place to avoid that, but it's only currently used when the backend is in all-stop mode. This series fixes that work in non-stop too, and further improves it. As a result, the all-stop and non-stop code paths in the backends are further merged. Also the native and gdbserver backends end up a little bit more similar. Both good things on their own. Tested on x86_64 Fedora 20, native and gdbserver. Pedro Alves (8): gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB watch_thread_num.exp and targets with fairer event reporting cleanup and speed up (software_)breakpoint_inserted_here_p linux-nat.c: clean up pending status checking and resuming LWPs linux-nat.c: always mark execing LWP as resumed linux-nat.c: better starvation avoidance, handle non-stop mode too [gdbserver] linux-low.c: better starvation avoidance, handle non-stop mode too add non-stop test that stresses thread starvation issues gdb/breakpoint.c | 83 ++- gdb/breakpoint.h | 5 + gdb/gdbserver/linux-low.c | 707 +++++++++++--------- gdb/gdbserver/linux-low.h | 29 +- gdb/gdbserver/linux-x86-low.c | 2 +- gdb/gdbserver/mem-break.c | 34 + gdb/gdbserver/mem-break.h | 10 + gdb/gdbserver/target.h | 10 - gdb/gdbserver/tracepoint.c | 5 - gdb/linux-nat.c | 734 ++++++++++----------- gdb/linux-nat.h | 31 +- gdb/testsuite/gdb.base/annota1.exp | 9 +- gdb/testsuite/gdb.base/watch_thread_num.c | 21 +- gdb/testsuite/gdb.base/watch_thread_num.exp | 40 +- gdb/testsuite/gdb.threads/ia64-sigill.c | 11 + gdb/testsuite/gdb.threads/non-stop-fair-events.c | 84 +++ gdb/testsuite/gdb.threads/non-stop-fair-events.exp | 161 +++++ gdb/testsuite/gdb.threads/siginfo-threads.c | 13 + gdb/testsuite/gdb.threads/watchthreads-reorder.c | 13 + gdb/x86-linux-nat.c | 2 +- 20 files changed, 1221 insertions(+), 783 deletions(-) create mode 100644 gdb/testsuite/gdb.threads/non-stop-fair-events.c create mode 100644 gdb/testsuite/gdb.threads/non-stop-fair-events.exp -- 1.9.3