diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-06 12:16:45 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-13 23:30:29 +0300 |
commit | 726f3234dd125633438922a07a80f933f13daf82 (patch) | |
tree | f377b995c540364f1575bb3d64495b25667f2078 /tools/perf/builtin-trace.c | |
parent | 14a052df1cfa563093f20847d52caad4be5d2adc (diff) | |
download | linux-726f3234dd125633438922a07a80f933f13daf82.tar.xz |
perf trace: Support --events foo:bar --no-syscalls
I.e. support tracing just tracepoints, without strace like
raw_syscalls:*.
[acme@ssdandy linux]$ trace --no-sys --ev sched:*exec,sched:*switch,sched:*exit usleep 1
0.048 ( ): sched:sched_process_exec:filename=/usr/bin/usleep pid=27298 old_pid=27298)
0.369 ( ): sched:sched_switch:usleep:27298 [120] S ==> swapper/5:0 [120])
0.452 ( ): sched:sched_process_exit:comm=usleep pid=27298 prio=120)
[acme@ssdandy linux]$
TODO: remove that (...) thing when --no-syscalls is specified.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vn0hsixsbhm31b2rpj97r96k@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a44ac9336219..b1c1df9bfb26 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2625,7 +2625,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) if (trace.summary_only) trace.summary = trace.summary_only; - if (!trace.trace_syscalls && !trace.trace_pgfaults) { + if (!trace.trace_syscalls && !trace.trace_pgfaults && + trace.evlist->nr_entries == 0 /* Was --events used? */) { pr_err("Please specify something to trace.\n"); return -1; } |