Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234470
b: refs/heads/master
c: 170ae6b
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Feb 23, 2011
1 parent ff959ef commit 471ea66
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9848caf26dafefcec7881f0e3c35fc81c454ba59
refs/heads/master: 170ae6bc24e1d7f9bd921a484ec9ea2825497970
15 changes: 13 additions & 2 deletions trunk/tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,23 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
}

if (dso->origin == DSO__ORIG_KERNEL) {
char bf[BUILD_ID_SIZE * 2 + 16] = " with build id ";
char *build_id_msg = NULL;

if (dso->annotate_warned)
goto out_free_filename;

if (dso->has_build_id) {
build_id__sprintf(dso->build_id,
sizeof(dso->build_id), bf + 15);
build_id_msg = bf;
}
err = -ENOENT;
dso->annotate_warned = 1;
pr_err("Can't annotate %s: No vmlinux file was found in the "
"path\n", sym->name);
pr_err("Can't annotate %s: No vmlinux file%s was found in the "
"path.\nPlease use 'perf buildid-cache -av vmlinux' or "
"--vmlinux vmlinux.\n",
sym->name, build_id_msg ?: "");
goto out_free_filename;
}

Expand Down
8 changes: 0 additions & 8 deletions trunk/tools/perf/util/ui/browsers/hists.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,14 +924,6 @@ int hists__browse(struct hists *self, const char *helpline,
if (choice == annotate) {
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");
continue;
}

he = hist_browser__selected_entry(browser);
if (he == NULL)
continue;
Expand Down

0 comments on commit 471ea66

Please sign in to comment.