diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2015-04-23 22:46:12 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-04-29 10:38:02 -0300 |
commit | b3ac032b7a76fea678de225d26ae04d10e47f0ac (patch) | |
tree | 94de9c9eb1ca198aac2b9776a046c5c9e2faffbc /tools/perf/builtin-probe.c | |
parent | 87d650be1dcc9bd9bb200e73b985ddb740d067bc (diff) | |
download | op-kernel-dev-b3ac032b7a76fea678de225d26ae04d10e47f0ac.zip op-kernel-dev-b3ac032b7a76fea678de225d26ae04d10e47f0ac.tar.gz |
perf probe: Make --funcs option exclusive
The --funcs option 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 <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150423134612.26128.58189.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 [<options>] --line 'LINEDESC'", "perf probe [<options>] --vars 'PROBEPOINT'", #endif + "perf probe [<options>] --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); |