From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1738 invoked by alias); 11 Oct 2014 06:35:01 -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 1721 invoked by uid 89); 11 Oct 2014 06:35:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_BODY,SPF_PASS,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-HELO: aserp1040.oracle.com Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 11 Oct 2014 06:34:59 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9B6YuMZ031840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Oct 2014 06:34:57 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s9B6Yt47007174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Oct 2014 06:34:56 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9B6YtYV018574; Sat, 11 Oct 2014 06:34:55 GMT Received: from termi.oracle.com (/85.53.254.189) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 10 Oct 2014 23:34:54 -0700 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [PATCH V2 3/9] New commands `enable probe' and `disable probe'. References: <1412961772-16249-1-git-send-email-jose.marchesi@oracle.com> <1412961772-16249-4-git-send-email-jose.marchesi@oracle.com> <21560.22449.803178.90104@ruffy2.mtv.corp.google.com> Date: Sat, 11 Oct 2014 06:35:00 -0000 In-Reply-To: <21560.22449.803178.90104@ruffy2.mtv.corp.google.com> (Doug Evans's message of "Fri, 10 Oct 2014 15:03:29 -0700") Message-ID: <878uknun2f.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00287.txt.bz2 Hi Doug. Would it be useful to have "info probes" show the enable/disable state of each probe? Or at least know which ones have been disabled. Right, `info probes' actually tells you the "Enabled" status of the probes, provided there is at least one dtrace probe in the executable. For example: (gdb) info probes Provider Name Where Semaphore Enabled Object demo am-main 0x0000000000400c96 n/a /home/jemarch/oracle/usdt/demo demo another 0x0000000000400c8b n/a always /home/jemarch/oracle/usdt/demo demo progress-counter 0x0000000000400c81 n/a no /home/jemarch/oracle/usdt/demo In the example above demo:am-main is a systemtap probe, for which "Enabled" reads n/a. demo:another is a dtrace probe which cannot be disabled (it does not have any associated enabler) and demo:progress-counter is a dtrace probe which is disabled. This is the source code used for the example above: #include "stap-sdt.h" #include "demo.h" int main(int argc, char *argv[]) { int i=0; long int foo = 666; char *jaja = "oh yeah"; while (i < 10) { i++; if (DEMO_PROGRESS_COUNTER_ENABLED()) DEMO_PROGRESS_COUNTER (i, foo, jaja); DEMO_ANOTHER (i); } STAP_PROBE3(demo, am-main, i, foo, jaja); i = 0; }