Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3ac032b authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: default avatarArnaldo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 87d650be
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,8 @@ or
'perf probe' [options] --line='LINE'
'perf probe' [options] --line='LINE'
or
or
'perf probe' [options] --vars='PROBEPOINT'
'perf probe' [options] --vars='PROBEPOINT'
or
'perf probe' [options] --funcs


DESCRIPTION
DESCRIPTION
-----------
-----------
+2 −0
Original line number Original line Diff line number Diff line
@@ -321,6 +321,7 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
		"perf probe [<options>] --line 'LINEDESC'",
		"perf probe [<options>] --line 'LINEDESC'",
		"perf probe [<options>] --vars 'PROBEPOINT'",
		"perf probe [<options>] --vars 'PROBEPOINT'",
#endif
#endif
		"perf probe [<options>] --funcs",
		NULL
		NULL
};
};
	struct option options[] = {
	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, 'L', "line", PARSE_OPT_EXCLUSIVE);
	set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE);
	set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE);
#endif
#endif
	set_option_flag(options, 'F', "funcs", PARSE_OPT_EXCLUSIVE);


	argc = parse_options(argc, argv, options, probe_usage,
	argc = parse_options(argc, argv, options, probe_usage,
			     PARSE_OPT_STOP_AT_NON_OPTION);
			     PARSE_OPT_STOP_AT_NON_OPTION);