From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26509 invoked by alias); 26 Oct 2011 17:20:44 -0000 Received: (qmail 26488 invoked by uid 22791); 26 Oct 2011 17:20:43 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 17:20:19 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RJ79H-0003OM-5g from pedro_alves@mentor.com ; Wed, 26 Oct 2011 10:20:19 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Oct 2011 18:20:17 +0100 From: Pedro Alves To: "Ulrich Weigand" Subject: Re: [patch] Multi-architecture debugging regression (Re: performance of multithreading gets gradually worse under gdb) Date: Wed, 26 Oct 2011 17:25:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201110261714.p9QHEBT8020920@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201110261714.p9QHEBT8020920@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110261820.13111.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg00699.txt.bz2 On Wednesday 26 October 2011 18:14:11, Ulrich Weigand wrote: > Pedro Alves wrote: > > > 2011-02-04 Pedro Alves > > > > gdb/ > > * regcache.c (registers_changed_ptid): Don't explictly always > > clear `current_regcache'. Only clear current_thread_ptid and > > current_thread_arch when PTID matches. Only reinit the frame > > cache if PTID matches the current inferior_ptid. Move alloca(0) > > call to ... > > (registers_changed): ... here. > > It seems this patch broke multi-architecture debugging on Cell/B.E. since > the cached thread architecture is sometimes not invalidated when it should > be. This happens when resume is called with a PTID that refers to all > threads of a process. > > The problem is that your patch specifically handles PTIDs that refer to > one particular thread, and also handles a wildcard PTID that refers to > all threads of all processes. But it does not handle PTIDs that refer > to all threads of one single process. > > I think the code should simply use ptid_match here (as is already done > elsewhere, even in this same function). This fixes the problem on > Cell/B.E. for me ... > > Tested on powerpc-linux (Cell/B.E.). > Does this look OK to you? Yes, thanks. -- Pedro Alves