Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | [PATCH 07/23] perf data: Add -q/--quiet option | Date | Wed, 8 Mar 2017 00:08:35 +0900 |
| |
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-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
| |