diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-12 15:05:02 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-13 09:11:52 -0400 |
commit | 59247e33ff494e3643cdff54b64bf72575052b76 (patch) | |
tree | 75bbf85deaff38eaa562eefb45bdb38fbcd38849 /tools | |
parent | e20ab86e51218f9949f41fb39a6c4f63b662f135 (diff) |
perf trace: Do not accept --no-syscalls together with -e
Doesn't make sense and was causing a segfault, fix it.
# trace -e clone --no-syscalls --event sched:*exec firefox
The -e option can't be used with --no-syscalls.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ccrahezikdk2uebptzr1eyyi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-trace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index b842ddd3ad0c..d49c131bb5de 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -3344,6 +3344,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) | |||
3344 | goto out; | 3344 | goto out; |
3345 | } | 3345 | } |
3346 | 3346 | ||
3347 | err = -1; | ||
3348 | |||
3347 | if (trace.trace_pgfaults) { | 3349 | if (trace.trace_pgfaults) { |
3348 | trace.opts.sample_address = true; | 3350 | trace.opts.sample_address = true; |
3349 | trace.opts.sample_time = true; | 3351 | trace.opts.sample_time = true; |
@@ -3368,6 +3370,11 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) | |||
3368 | return -1; | 3370 | return -1; |
3369 | } | 3371 | } |
3370 | 3372 | ||
3373 | if (!trace.trace_syscalls && ev_qualifier_str) { | ||
3374 | pr_err("The -e option can't be used with --no-syscalls.\n"); | ||
3375 | goto out; | ||
3376 | } | ||
3377 | |||
3371 | if (output_name != NULL) { | 3378 | if (output_name != NULL) { |
3372 | err = trace__open_output(&trace, output_name); | 3379 | err = trace__open_output(&trace, output_name); |
3373 | if (err < 0) { | 3380 | if (err < 0) { |