From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
kernel-team@lge.com
Subject: [PATCH 5/6] perf annotate: Add -q/--quiet option
Date: Fri, 17 Feb 2017 17:17:41 +0900 [thread overview]
Message-ID: <20170217081742.17417-6-namhyung@kernel.org> (raw)
In-Reply-To: <20170217081742.17417-1-namhyung@kernel.org>
The -q/--quiet option is to suppress any message. Sometimes users just
want to see the numbers and it can be used for that case.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-annotate.txt | 4 ++++
tools/perf/builtin-annotate.c | 4 ++++
tools/perf/util/annotate.c | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt
index 8ffbd272952d..a89273d8e744 100644
--- a/tools/perf/Documentation/perf-annotate.txt
+++ b/tools/perf/Documentation/perf-annotate.txt
@@ -39,6 +39,10 @@ OPTIONS
--verbose::
Be more verbose. (Show symbol address, etc)
+-q::
+--quiet::
+ Do not show any message. (Suppress -v)
+
-D::
--dump-raw-trace::
Dump raw trace in ASCII.
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index ebb628332a6e..4f52d85f5ebc 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -410,6 +410,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"),
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
@@ -463,6 +464,9 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
annotate.sym_hist_filter = argv[0];
}
+ if (quiet)
+ perf_quiet_option();
+
file.path = input_name;
annotate.session = perf_session__new(&file, false, &annotate.tool);
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 06cc04e5806a..273f21fa32b5 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1768,7 +1768,7 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
printf("%-*.*s----\n",
graph_dotted_len, graph_dotted_len, graph_dotted_line);
- if (verbose)
+ if (verbose > 0)
symbol__annotate_hits(sym, evsel);
list_for_each_entry(pos, ¬es->src->source, node) {
--
2.11.1
next prev parent reply other threads:[~2017-02-17 8:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 8:17 [PATCHSET 0/6] perf tools: Add -q/--quiet option to suppress messages (v1) Namhyung Kim
2017-02-17 8:17 ` [PATCH 1/6] perf utils: Add perf_quiet_option() Namhyung Kim
2017-02-21 8:15 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2017-02-17 8:17 ` [PATCH 2/6] perf utils: Check verbose flag properly Namhyung Kim
2017-02-20 14:35 ` Arnaldo Carvalho de Melo
2017-02-21 1:38 ` Namhyung Kim
2017-02-21 8:16 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2017-02-17 8:17 ` [PATCH 3/6] perf report: Add -q/--quiet option Namhyung Kim
2017-02-17 11:09 ` Jiri Olsa
2017-02-19 0:21 ` Namhyung Kim
2017-02-20 19:08 ` Arnaldo Carvalho de Melo
2017-02-21 1:40 ` Namhyung Kim
2017-02-21 8:16 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2017-02-17 8:17 ` [PATCH 4/6] perf diff: " Namhyung Kim
2017-02-21 8:17 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2017-02-17 8:17 ` Namhyung Kim [this message]
2017-02-21 8:17 ` [tip:perf/urgent] perf annotate: " tip-bot for Namhyung Kim
2017-02-17 8:17 ` [PATCH 6/6] perf record: Honor quiet option properly Namhyung Kim
2017-02-21 8:18 ` [tip:perf/urgent] perf record: Honor --quiet " tip-bot for Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170217081742.17417-6-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.