diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-08-22 15:49:54 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-08-26 16:25:43 -0400 |
commit | 7c304ee0fc66b4c21282e1cce32631c263f8c481 (patch) | |
tree | 69519a47d7c883d699a78ff6bb1bc8f023067d0a /tools | |
parent | b059efdf52a27819b78aa30f171f1e8e439152b6 (diff) |
perf trace: Add --verbose option
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ain6q4u8g3bpnh18yhw24v2x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Documentation/perf-trace.txt | 4 | ||||
-rw-r--r-- | tools/perf/builtin-trace.c | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tools/perf/Documentation/perf-trace.txt b/tools/perf/Documentation/perf-trace.txt index 4754f11a862b..fe19811faf90 100644 --- a/tools/perf/Documentation/perf-trace.txt +++ b/tools/perf/Documentation/perf-trace.txt | |||
@@ -49,6 +49,10 @@ OPTIONS | |||
49 | --uid=:: | 49 | --uid=:: |
50 | Record events in threads owned by uid. Name or number. | 50 | Record events in threads owned by uid. Name or number. |
51 | 51 | ||
52 | -v:: | ||
53 | --verbose=:: | ||
54 | Verbosity level. | ||
55 | |||
52 | -i:: | 56 | -i:: |
53 | --no-inherit:: | 57 | --no-inherit:: |
54 | Child tasks do not inherit counters. | 58 | Child tasks do not inherit counters. |
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 6ab7a7a5e66e..c907e7e41a74 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <traceevent/event-parse.h> | 1 | #include <traceevent/event-parse.h> |
2 | #include "builtin.h" | 2 | #include "builtin.h" |
3 | #include "util/color.h" | 3 | #include "util/color.h" |
4 | #include "util/debug.h" | ||
4 | #include "util/evlist.h" | 5 | #include "util/evlist.h" |
5 | #include "util/machine.h" | 6 | #include "util/machine.h" |
6 | #include "util/thread.h" | 7 | #include "util/thread.h" |
@@ -311,10 +312,12 @@ static struct syscall *trace__syscall_info(struct trace *trace, | |||
311 | return &trace->syscalls.table[id]; | 312 | return &trace->syscalls.table[id]; |
312 | 313 | ||
313 | out_cant_read: | 314 | out_cant_read: |
314 | fprintf(trace->output, "Problems reading syscall %d", id); | 315 | if (verbose) { |
315 | if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) | 316 | fprintf(trace->output, "Problems reading syscall %d", id); |
316 | fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); | 317 | if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) |
317 | fputs(" information", trace->output); | 318 | fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); |
319 | fputs(" information\n", trace->output); | ||
320 | } | ||
318 | return NULL; | 321 | return NULL; |
319 | } | 322 | } |
320 | 323 | ||
@@ -714,6 +717,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) | |||
714 | "show only events with duration > N.M ms", | 717 | "show only events with duration > N.M ms", |
715 | trace__set_duration), | 718 | trace__set_duration), |
716 | OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"), | 719 | OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"), |
720 | OPT_INCR('v', "verbose", &verbose, "be more verbose"), | ||
717 | OPT_END() | 721 | OPT_END() |
718 | }; | 722 | }; |
719 | int err; | 723 | int err; |