From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18824 invoked by alias); 16 Sep 2015 13:54:06 -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 18815 invoked by uid 89); 16 Sep 2015 13:54:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no 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; Wed, 16 Sep 2015 13:54:04 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C4A5228E40A; Wed, 16 Sep 2015 13:54:03 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8GDs1G4020871; Wed, 16 Sep 2015 09:54:02 -0400 Message-ID: <55F97479.9070807@redhat.com> Date: Wed, 16 Sep 2015 13:54:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ulrich Weigand , Yao Qi CC: Pierre Langlois , gdb-patches@sourceware.org, cole945@gmail.com Subject: Re: [PATCH 1/2] [GDBserver] Fix compiling conditional expressions accessing registers References: <20150916115014.0A5EA1DA8@oc7340732750.ibm.com> In-Reply-To: <20150916115014.0A5EA1DA8@oc7340732750.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-09/txt/msg00375.txt.bz2 On 09/16/2015 12:50 PM, Ulrich Weigand wrote: > Yao Qi wrote: >> Pierre Langlois writes: >> >>> This patch fixes this issue by replacing `gdb_agent_get_raw_reg' with a >>> `gdb_agent_get_reg' function which takes the tracepoint context object >>> as argument instead of a raw buffer. Additionally, this patch makes >>> this function architecture independent by initializing the context's >>> regcache early and making `gdb_agent_get_reg' use `collect_register'. >>> As a result, the fast tracepoint context object does not need to >>> contain the raw register buffer. >> >> The fix looks reasonable to me as it makes no sense to keep two copies >> of registers. I go through this patch, and it looks good to me. > > It seems to me this was intended as performance optimization to avoid > having to do the full regcache setup every time a tracepoint is hit, > in case we're not actually tracing registers ... > > Not sure whether this is a real performance concern for actual use > cases though. I don't have any actual measurements ... Yes, I was just now reading this, and was going to say the same. E.g., the original fast tracepoints code was tuned to avoid as much work as possible in the condition-fails scenario, when the condition only accesses a global. That is, e.g., "trace foo if debug_knob == 1". I no longer have the numbers captured at the time though. Thanks, Pedro Alves