]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
perf annotate: Add -q/--quiet option
authorNamhyung Kim <namhyung@kernel.org>
Fri, 17 Feb 2017 08:17:41 +0000 (17:17 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 20 Feb 2017 14:47:18 +0000 (11:47 -0300)
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>
Suggested-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170217081742.17417-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-annotate.txt
tools/perf/builtin-annotate.c

index 8ffbd272952d2e57d21451408579c684a551aa65..a89273d8e74417b8d7feb4b96e7fab6a52513339 100644 (file)
@@ -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.
index ebb628332a6e59a938347eca53c3da81c859aee5..4f52d85f5ebc574daa91f29b1a3d24758c3d276d 100644 (file)
@@ -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);