From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16552 invoked by alias); 8 Oct 2013 13:30:57 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 16541 invoked by uid 89); 8 Oct 2013 13:30:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e23smtp01.au.ibm.com Received: from e23smtp01.au.ibm.com (HELO e23smtp01.au.ibm.com) (202.81.31.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 08 Oct 2013 13:30:56 +0000 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Oct 2013 23:30:53 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 8 Oct 2013 23:30:50 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 754492BB0040 for ; Wed, 9 Oct 2013 00:30:49 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r98DUcsA4849950 for ; Wed, 9 Oct 2013 00:30:38 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r98DUmqu012823 for ; Wed, 9 Oct 2013 00:30:49 +1100 Received: from localhost.localdomain ([9.79.201.136]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r98DUgBV012725; Wed, 9 Oct 2013 00:30:45 +1100 Message-ID: <52540902.6040500@linux.vnet.ibm.com> Date: Tue, 08 Oct 2013 13:30:00 -0000 From: Hemant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Masami Hiramatsu CC: linux-kernel@vger.kernel.org, srikar@linux.vnet.ibm.com, peterz@infradead.org, oleg@redhat.com, hegdevasant@linux.vnet.ibm.com, mingo@redhat.com, anton@redhat.com, systemtap@sourceware.org, namhyung@kernel.org, aravinda@linux.vnet.ibm.com Subject: Re: [PATCH v2 2/3] Support for perf to probe into SDT markers: References: <20131007063911.11693.33624.stgit@hemant-fedora> <20131007064806.11693.23845.stgit@hemant-fedora> <5253F0E4.4080105@hitachi.com> In-Reply-To: <5253F0E4.4080105@hitachi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13100813-1618-0000-0000-000004C10340 X-SW-Source: 2013-q4/txt/msg00032.txt.bz2 On 10/08/2013 05:17 PM, Masami Hiramatsu wrote: > (2013/10/07 15:48), Hemant Kumar wrote: >> [...] >> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c >> index cbd2383..6f09723 100644 >> --- a/tools/perf/builtin-probe.c >> +++ b/tools/perf/builtin-probe.c >> @@ -370,6 +370,17 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) >> pr_err("Error: Don't use --markers with --funcs.\n"); >> usage_with_options(probe_usage, options); >> } >> + if (params.mod_events) { >> + ret = add_perf_probe_events(params.events, >> + params.nevents, >> + params.max_probe_points, >> + params.target, >> + params.force_add); >> + if (ret < 0) { >> + pr_err(" Error: Failed to add events. " >> + " (%d)\n", ret); >> + } >> + } > What is this code for? params.sdt is true only if "--markers" is set, and that > should not be used with --add and --del, because it's an action "query markers". > We should give an error and abort here. Yeah, I see your point. We should not add an event in this case. Instead an error should be displayed. Thanks for pointing that. And we already have add_perf_probe_events() call. That should be called instead. > > Other points are covered by Namhyung's review(thanks!). > > Thank you! > Yeah, will make the required changes and post the next iteration ASAP. -- Thanks Hemant