diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-22 10:20:24 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-22 10:20:24 -0400 |
commit | 6e78c9fd1bc2c7e04b3d7052e9eb27aa536e4e2c (patch) | |
tree | f1f17a81de35430dec2774985e8afb41fb3acecb /tools | |
parent | 0e8dc2597487848bb076d6b3d8440c85dde521e7 (diff) |
perf tui: Remove annotate from popup menu after failure
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/newt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 0b45658f7497..c65838c99354 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -914,6 +914,9 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na | |||
914 | 914 | ||
915 | switch (toupper(es.u.key)) { | 915 | switch (toupper(es.u.key)) { |
916 | case 'A': | 916 | case 'A': |
917 | if (browser->selection->map == NULL && | ||
918 | browser->selection->map->dso->annotate_warned) | ||
919 | continue; | ||
917 | goto do_annotate; | 920 | goto do_annotate; |
918 | case 'D': | 921 | case 'D': |
919 | goto zoom_dso; | 922 | goto zoom_dso; |
@@ -957,6 +960,7 @@ do_help: | |||
957 | } | 960 | } |
958 | 961 | ||
959 | if (browser->selection->sym != NULL && | 962 | if (browser->selection->sym != NULL && |
963 | !browser->selection->map->dso->annotate_warned && | ||
960 | asprintf(&options[nr_options], "Annotate %s", | 964 | asprintf(&options[nr_options], "Annotate %s", |
961 | browser->selection->sym->name) > 0) | 965 | browser->selection->sym->name) > 0) |
962 | annotate = nr_options++; | 966 | annotate = nr_options++; |
@@ -991,6 +995,7 @@ do_help: | |||
991 | struct hist_entry *he; | 995 | struct hist_entry *he; |
992 | do_annotate: | 996 | do_annotate: |
993 | if (browser->selection->map->dso->origin == DSO__ORIG_KERNEL) { | 997 | if (browser->selection->map->dso->origin == DSO__ORIG_KERNEL) { |
998 | browser->selection->map->dso->annotate_warned = 1; | ||
994 | ui_helpline__puts("No vmlinux file found, can't " | 999 | ui_helpline__puts("No vmlinux file found, can't " |
995 | "annotate with just a " | 1000 | "annotate with just a " |
996 | "kallsyms file"); | 1001 | "kallsyms file"); |