diff options
-rw-r--r-- | tools/perf/util/annotate.c | 15 | ||||
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 8 |
2 files changed, 13 insertions, 10 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 70ec422ddb64..0d0830c98cd7 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -295,12 +295,23 @@ fallback: | |||
295 | } | 295 | } |
296 | 296 | ||
297 | if (dso->origin == DSO__ORIG_KERNEL) { | 297 | if (dso->origin == DSO__ORIG_KERNEL) { |
298 | char bf[BUILD_ID_SIZE * 2 + 16] = " with build id "; | ||
299 | char *build_id_msg = NULL; | ||
300 | |||
298 | if (dso->annotate_warned) | 301 | if (dso->annotate_warned) |
299 | goto out_free_filename; | 302 | goto out_free_filename; |
303 | |||
304 | if (dso->has_build_id) { | ||
305 | build_id__sprintf(dso->build_id, | ||
306 | sizeof(dso->build_id), bf + 15); | ||
307 | build_id_msg = bf; | ||
308 | } | ||
300 | err = -ENOENT; | 309 | err = -ENOENT; |
301 | dso->annotate_warned = 1; | 310 | dso->annotate_warned = 1; |
302 | pr_err("Can't annotate %s: No vmlinux file was found in the " | 311 | pr_err("Can't annotate %s: No vmlinux file%s was found in the " |
303 | "path\n", sym->name); | 312 | "path.\nPlease use 'perf buildid-cache -av vmlinux' or " |
313 | "--vmlinux vmlinux.\n", | ||
314 | sym->name, build_id_msg ?: ""); | ||
304 | goto out_free_filename; | 315 | goto out_free_filename; |
305 | } | 316 | } |
306 | 317 | ||
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index 294b49538522..497b3c4076a3 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c | |||
@@ -924,14 +924,6 @@ int hists__browse(struct hists *self, const char *helpline, | |||
924 | if (choice == annotate) { | 924 | if (choice == annotate) { |
925 | struct hist_entry *he; | 925 | struct hist_entry *he; |
926 | do_annotate: | 926 | do_annotate: |
927 | if (browser->selection->map->dso->origin == DSO__ORIG_KERNEL) { | ||
928 | browser->selection->map->dso->annotate_warned = 1; | ||
929 | ui_helpline__puts("No vmlinux file found, can't " | ||
930 | "annotate with just a " | ||
931 | "kallsyms file"); | ||
932 | continue; | ||
933 | } | ||
934 | |||
935 | he = hist_browser__selected_entry(browser); | 927 | he = hist_browser__selected_entry(browser); |
936 | if (he == NULL) | 928 | if (he == NULL) |
937 | continue; | 929 | continue; |