perf annotate browser: Support --show-nr-samples option
Support the --show-nr-samples in the TUI browser.
Committer notes:
Lift the restriction about --tui but leave it for --gtk:
$ export LD_LIBRARY_PATH=~/lib64
$ perf annotate --gtk --show-nr-samples --show-nr-samples is not available in --gtk mode at this time
$
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1503046023-5646-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 89fc038..c383731 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -474,8 +474,8 @@
annotate.sym_hist_filter = argv[0];
}
- if (symbol_conf.show_nr_samples && !annotate.use_stdio) {
- pr_err("--show-nr-samples is only available in --stdio mode at this time\n");
+ if (symbol_conf.show_nr_samples && annotate.use_gtk) {
+ pr_err("--show-nr-samples is not available in --gtk mode at this time\n");
return ret;
}