[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170307150851.22304-20-namhyung@kernel.org>
Date: Wed, 8 Mar 2017 00:08:47 +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 19/23] perf script: 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-script.txt | 8 ++++++++
tools/perf/builtin-script.c | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index 4ed5f239ba7d..24f7e36a4fe8 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -75,6 +75,14 @@ OPTIONS
<command>...::
Any command you can specify in a shell.
+-v::
+--verbose::
+ Be more verbose. (show debug messages, etc)
+
+-q::
+--quiet::
+ Do not show any message. (Suppress -v)
+
-D::
--dump-raw-trace=::
Display verbose dump of the trace data.
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index d1c95f0b8a0f..f46498f2e73a 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2122,6 +2122,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
"dump raw trace in ASCII"),
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
OPT_BOOLEAN('L', "Latency", &latency_format,
"show latency attributes (irqs/preemption disabled, etc)"),
OPT_CALLBACK_NOOPT('l', "list", NULL, NULL, "list available scripts",
@@ -2210,6 +2211,9 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
argc = parse_options_subcommand(argc, argv, options, script_subcommands, script_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
+ if (quiet)
+ perf_quiet_option();
+
file.path = input_name;
file.force = symbol_conf.force;
--
2.11.0
Powered by blists - more mailing lists