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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b059efdf
...@@ -49,6 +49,10 @@ OPTIONS ...@@ -49,6 +49,10 @@ OPTIONS
--uid=:: --uid=::
Record events in threads owned by uid. Name or number. Record events in threads owned by uid. Name or number.
-v::
--verbose=::
Verbosity level.
-i:: -i::
--no-inherit:: --no-inherit::
Child tasks do not inherit counters. Child tasks do not inherit counters.
......
#include <traceevent/event-parse.h> #include <traceevent/event-parse.h>
#include "builtin.h" #include "builtin.h"
#include "util/color.h" #include "util/color.h"
#include "util/debug.h"
#include "util/evlist.h" #include "util/evlist.h"
#include "util/machine.h" #include "util/machine.h"
#include "util/thread.h" #include "util/thread.h"
...@@ -311,10 +312,12 @@ static struct syscall *trace__syscall_info(struct trace *trace, ...@@ -311,10 +312,12 @@ static struct syscall *trace__syscall_info(struct trace *trace,
return &trace->syscalls.table[id]; return &trace->syscalls.table[id];
out_cant_read: out_cant_read:
fprintf(trace->output, "Problems reading syscall %d", id); if (verbose) {
if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) fprintf(trace->output, "Problems reading syscall %d", id);
fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL)
fputs(" information", trace->output); fprintf(trace->output, "(%s)", trace->syscalls.table[id].name);
fputs(" information\n", trace->output);
}
return NULL; return NULL;
} }
...@@ -714,6 +717,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) ...@@ -714,6 +717,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
"show only events with duration > N.M ms", "show only events with duration > N.M ms",
trace__set_duration), trace__set_duration),
OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"), OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"),
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
OPT_END() OPT_END()
}; };
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment