aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-10-21 08:58:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-10-21 08:58:24 -0400
commita6e51f9fa9124ad6657e6f1c8df2b1033922e9d7 (patch)
tree0f8cf0fc835fd16318886c51229c45234a52e506 /tools
parentcf9580036a830f9e95f32dbcedfc57ea1697f120 (diff)
perf hists browser: Refuse 'a' hotkey on non symbolic views
We don't allocate the histogram data structures for --sort lists without "sym", so, just like was done for the menu, don't try to annotate when 'a' is pressed, just warn the user about it. Reported-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-27mjg02s2mbw8lfxqv7jpzec@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/ui/browsers/hists.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index af12e6f10792..4663dcb2a19b 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -882,6 +882,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
882 */ 882 */
883 goto out_free_stack; 883 goto out_free_stack;
884 case 'a': 884 case 'a':
885 if (!browser->has_symbols) {
886 ui__warning(
887 "Annotation is only available for symbolic views, "
888 "include \"sym\" in --sort to use it.");
889 continue;
890 }
891
885 if (browser->selection == NULL || 892 if (browser->selection == NULL ||
886 browser->selection->sym == NULL || 893 browser->selection->sym == NULL ||
887 browser->selection->map->dso->annotate_warned) 894 browser->selection->map->dso->annotate_warned)