From 05b7526e60d1f15d16e8f503a57a3600ca5cbba0 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sat, 22 May 2010 11:20:24 -0300 Subject: [PATCH] --- yaml --- r: 199148 b: refs/heads/master c: 6e78c9fd1bc2c7e04b3d7052e9eb27aa536e4e2c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/util/newt.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f5716bc8d924..5fb5feab12a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0e8dc2597487848bb076d6b3d8440c85dde521e7 +refs/heads/master: 6e78c9fd1bc2c7e04b3d7052e9eb27aa536e4e2c diff --git a/trunk/tools/perf/util/newt.c b/trunk/tools/perf/util/newt.c index 0b45658f7497..c65838c99354 100644 --- a/trunk/tools/perf/util/newt.c +++ b/trunk/tools/perf/util/newt.c @@ -914,6 +914,9 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na switch (toupper(es.u.key)) { case 'A': + if (browser->selection->map == NULL && + browser->selection->map->dso->annotate_warned) + continue; goto do_annotate; case 'D': goto zoom_dso; @@ -957,6 +960,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na } if (browser->selection->sym != NULL && + !browser->selection->map->dso->annotate_warned && asprintf(&options[nr_options], "Annotate %s", browser->selection->sym->name) > 0) annotate = nr_options++; @@ -991,6 +995,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na struct hist_entry *he; do_annotate: if (browser->selection->map->dso->origin == DSO__ORIG_KERNEL) { + browser->selection->map->dso->annotate_warned = 1; ui_helpline__puts("No vmlinux file found, can't " "annotate with just a " "kallsyms file");