[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-ain6q4u8g3bpnh18yhw24v2x@git.kernel.org>
Date: Thu, 29 Aug 2013 03:08:48 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, paulus@...ba.org,
acme@...hat.com, hpa@...or.com, mingo@...nel.org,
peterz@...radead.org, efault@....de, fweisbec@...il.com,
adrian.hunter@...el.com, dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf trace: Add --verbose option
Commit-ID: 7c304ee0fc66b4c21282e1cce32631c263f8c481
Gitweb: http://git.kernel.org/tip/7c304ee0fc66b4c21282e1cce32631c263f8c481
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 22 Aug 2013 16:49:54 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 26 Aug 2013 17:25:43 -0300
perf trace: Add --verbose option
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-ain6q4u8g3bpnh18yhw24v2x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/Documentation/perf-trace.txt | 4 ++++
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 4754f11..fe19811 100644
--- a/tools/perf/Documentation/perf-trace.txt
+++ b/tools/perf/Documentation/perf-trace.txt
@@ -49,6 +49,10 @@ OPTIONS
--uid=::
Record events in threads owned by uid. Name or number.
+-v::
+--verbose=::
+ Verbosity level.
+
-i::
--no-inherit::
Child tasks do not inherit counters.
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 6ab7a7a..c907e7e 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1,6 +1,7 @@
#include <traceevent/event-parse.h>
#include "builtin.h"
#include "util/color.h"
+#include "util/debug.h"
#include "util/evlist.h"
#include "util/machine.h"
#include "util/thread.h"
@@ -311,10 +312,12 @@ static struct syscall *trace__syscall_info(struct trace *trace,
return &trace->syscalls.table[id];
out_cant_read:
- fprintf(trace->output, "Problems reading syscall %d", id);
- if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL)
- fprintf(trace->output, "(%s)", trace->syscalls.table[id].name);
- fputs(" information", trace->output);
+ if (verbose) {
+ fprintf(trace->output, "Problems reading syscall %d", id);
+ if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL)
+ fprintf(trace->output, "(%s)", trace->syscalls.table[id].name);
+ fputs(" information\n", trace->output);
+ }
return NULL;
}
@@ -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",
trace__set_duration),
OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"),
+ OPT_INCR('v', "verbose", &verbose, "be more verbose"),
OPT_END()
};
int err;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists