Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755643AbbDULqS (ORCPT ); Tue, 21 Apr 2015 07:46:18 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:56142 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211AbbDULoE (ORCPT ); Tue, 21 Apr 2015 07:44:04 -0400 X-AuditID: 85900ec0-9f6c5b9000003d4c-6a-553637f8f4f0 Subject: [PATCH perf/core 1/8] [BUGFIX] perf probe: Make --funcs option exclusive From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Date: Tue, 21 Apr 2015 20:41:58 +0900 Message-ID: <20150421114158.21617.58375.stgit@localhost.localdomain> In-Reply-To: <20150421114155.21617.91519.stgit@localhost.localdomain> References: <20150421114155.21617.91519.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1969 Lines: 53 --funcs option is a command which should be given exclusively. This adds PARSE_OPT_EXCUSIVE flag on --funcs (-F) option. Without this, 'perf probe --funcs -l' just shows the list of probes. With this, it shows error message correctly. This also fixes the help message and the documentation. Signed-off-by: Masami Hiramatsu --- tools/perf/Documentation/perf-probe.txt | 2 ++ tools/perf/builtin-probe.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt index 239609c..a4a3cc7 100644 --- a/tools/perf/Documentation/perf-probe.txt +++ b/tools/perf/Documentation/perf-probe.txt @@ -19,6 +19,8 @@ or 'perf probe' [options] --line='LINE' or 'perf probe' [options] --vars='PROBEPOINT' +or +'perf probe' [options] --funcs DESCRIPTION ----------- diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index f7b1af6..92dcce0 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -321,6 +321,7 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) "perf probe [] --line 'LINEDESC'", "perf probe [] --vars 'PROBEPOINT'", #endif + "perf probe [] --funcs", NULL }; struct option options[] = { @@ -402,6 +403,7 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); #endif + set_option_flag(options, 'F', "funcs", PARSE_OPT_EXCLUSIVE); argc = parse_options(argc, argv, options, probe_usage, PARSE_OPT_STOP_AT_NON_OPTION); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/