From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27998 invoked by alias); 10 Feb 2012 14:56:58 -0000 Received: (qmail 27990 invoked by uid 22791); 10 Feb 2012 14:56:57 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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, 10 Feb 2012 14:56:45 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1AEugW3007968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Feb 2012 09:56:42 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1AEueMj003446; Fri, 10 Feb 2012 09:56:41 -0500 Message-ID: <4F353028.2070409@redhat.com> Date: Fri, 10 Feb 2012 14:56: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 7/8] Agent capability for static tracepoint References: <4F1D55D7.7030506@codesourcery.com> <4F1D6994.1080902@codesourcery.com> <4F3428D4.5060202@redhat.com> <4F3529C3.8030806@codesourcery.com> In-Reply-To: <4F3529C3.8030806@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/msg00199.txt.bz2 On 02/10/2012 02:29 PM, Yao Qi wrote: > On 02/10/2012 04:13 AM, Pedro Alves wrote: >> On 01/23/2012 02:07 PM, Yao Qi wrote: >>>> Current libinproctrace.so agent is able to do operations on static >>>> tracepoint, which can be treated as one capability. This patch is to >>>> teach gdbserver to check agent's capability when performing operations >>>> related to static tracepoint. >>>> >> Hmm, not sure. Why aren't these being hooked at the same places >> where we already check/call maybe_write_ipa_ust_not_loaded and >> in_process_agent_loaded_ust? >> > > maybe_write_ipa_ust_not_loaded and in_process_agent_loaded_ust returns > agent is loaded or not. Considering GDB may/will support multiple > different agents, which have different capability, so "agent is loaded" > doesn't mean "agent has a certain capability". Is it reasonable? > I'd like replace global variable `ust_loaded' with capability mechanism > in agent. in_process_agent_loaded_ust (note the ust) is only true when both the IPA is loaded, _and_ there's ust support. So you should be able to replace all those with "agent can do static tracepoints", as that's what the checks are really doing. So again, why aren't your checks done at exactly the same places the present checks are done? -- Pedro Alves