From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29399 invoked by alias); 24 Feb 2012 14:19:40 -0000 Received: (qmail 29390 invoked by uid 22791); 24 Feb 2012 14:19:39 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Feb 2012 14:19:27 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1OEJNJC012054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Feb 2012 09:19:23 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1OEJMQ9009509; Fri, 24 Feb 2012 09:19:23 -0500 Message-ID: <4F479C6A.6000305@redhat.com> Date: Fri, 24 Feb 2012 14:25:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 6/9] agent capability of static tracepoint References: <1329447300-18841-1-git-send-email-yao@codesourcery.com> <1329447300-18841-7-git-send-email-yao@codesourcery.com> <4F46B4E2.6020504@redhat.com> <4F478CB4.3060705@codesourcery.com> In-Reply-To: <4F478CB4.3060705@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00566.txt.bz2 On 02/24/2012 01:12 PM, Yao Qi wrote: > On 02/24/2012 05:51 AM, Pedro Alves wrote: >> > Hmm, this looks backwards. We're reading the existence of a global in >> > the agent called "ust_loaded", indicating whether it has loaded >> > ust, and after, we check for the static trace capability. If >> > "ust_loaded" exists in the agent, then it sure understands static >> > tracepoints. The right check is: >> > >> > 1. does the agent understand static tracepoints? >> > 2. yes? good. and, is ust loaded perchance? >> > >> > If the agent doesn't understand AGENT_CAPA_STATIC_TRACE, >> > then you'd fail right on the ust_loaded read, or some other >> > mechanism to check whether ust is in fact loaded in the inferior. >> > > This logic makes sense to me. Then can you revert the rename please (and the reindent it caused)? Reading the callers, "loaded" is stronger than "supports", which would be true even if ust is not loaded. Let's leave a rename out until the semantics of the function changes. > /* Returns true if both the in-process agent library and the static > - tracepoints libraries are loaded in the inferior. */ > + tracepoints libraries are loaded in the inferior, and agent has > + capability on static tracepoints. */ s/on/for Okay with those changes. -- Pedro Alves