Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594368
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 02/23] perf buildid-cache: Add -q/--quiet option |
| Date | 2017-03-07 16:50 +0100 |
| Message-ID | <tipnt-152-37@gated-at.bofh.it> (permalink) |
| References | <tip46-X4-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-buildid-cache.txt | 4 ++++
tools/perf/builtin-buildid-cache.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf/Documentation/perf-buildid-cache.txt
index 058064db39d2..b9c2f8c9fcef 100644
--- a/tools/perf/Documentation/perf-buildid-cache.txt
+++ b/tools/perf/Documentation/perf-buildid-cache.txt
@@ -61,6 +61,10 @@ OPTIONS
--verbose::
Be more verbose.
+-q::
+--quiet::
+ Do not show any message.
+
SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 30e2b2cb2421..ff437a678976 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -311,6 +311,7 @@ int cmd_buildid_cache(int argc, const char **argv,
OPT_STRING('u', "update", &update_name_list_str, "file list",
"file(s) to update"),
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
OPT_END()
};
const char * const buildid_cache_usage[] = {
@@ -326,6 +327,9 @@ int cmd_buildid_cache(int argc, const char **argv,
!missing_filename && !update_name_list_str))
usage_with_options(buildid_cache_usage, buildid_cache_options);
+ if (quiet)
+ perf_quiet_option();
+
if (missing_filename) {
file.path = missing_filename;
file.force = force;
--
2.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 02/23] perf buildid-cache: Add -q/--quiet option Namhyung Kim <namhyung@kernel.org> - 2017-03-07 16:50 +0100
csiph-web