[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170307150851.22304-8-namhyung@kernel.org>
Date: Wed, 8 Mar 2017 00:08:35 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team@....com
Subject: [PATCH 07/23] perf data: Add -q/--quiet option
The -q/--quiet option is to suppress any message. Sometimes users just
want to run the command and it can be used for that case.
Suggested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/Documentation/perf-data.txt | 4 ++++
tools/perf/builtin-data.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/tools/perf/Documentation/perf-data.txt b/tools/perf/Documentation/perf-data.txt
index f0796a47dfa3..a063c6e83d99 100644
--- a/tools/perf/Documentation/perf-data.txt
+++ b/tools/perf/Documentation/perf-data.txt
@@ -34,6 +34,10 @@ OPTIONS for 'convert'
--verbose::
Be more verbose (show counter open errors, etc).
+-q::
+--quiet::
+ Do not show any message.
+
--all::
Convert all events, including non-sample events (comm, fork, ...), to output.
Default is off, only convert samples.
diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 7ad6e17ac6b3..895cc2fefa7d 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -60,6 +60,7 @@ static int cmd_data_convert(int argc, const char **argv,
};
const struct option options[] = {
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
OPT_STRING('i', "input", &input_name, "file", "input file name"),
#ifdef HAVE_LIBBABELTRACE_SUPPORT
OPT_STRING(0, "to-ctf", &to_ctf, NULL, "Convert to CTF format"),
@@ -81,6 +82,9 @@ static int cmd_data_convert(int argc, const char **argv,
return -1;
}
+ if (quiet)
+ perf_quiet_option();
+
if (to_ctf) {
#ifdef HAVE_LIBBABELTRACE_SUPPORT
return bt_convert__perf2ctf(input_name, to_ctf, &opts);
--
2.11.0
Powered by blists - more mailing lists