diff options
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 009ad76b0879..682a6d88862c 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -992,14 +992,14 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head) | |||
992 | char *filename = dso__build_id_filename(dso, NULL, 0); | 992 | char *filename = dso__build_id_filename(dso, NULL, 0); |
993 | char command[PATH_MAX * 2]; | 993 | char command[PATH_MAX * 2]; |
994 | FILE *file; | 994 | FILE *file; |
995 | int err = -1; | 995 | int err = 0; |
996 | u64 len; | 996 | u64 len; |
997 | 997 | ||
998 | if (filename == NULL) { | 998 | if (filename == NULL) { |
999 | if (dso->has_build_id) { | 999 | if (dso->has_build_id) { |
1000 | pr_err("Can't annotate %s: not enough memory\n", | 1000 | pr_err("Can't annotate %s: not enough memory\n", |
1001 | sym->name); | 1001 | sym->name); |
1002 | return -1; | 1002 | return -ENOMEM; |
1003 | } | 1003 | } |
1004 | /* | 1004 | /* |
1005 | * If we don't have build-ids, well, lets hope that this | 1005 | * If we don't have build-ids, well, lets hope that this |
@@ -1009,14 +1009,12 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head) | |||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | if (dso->origin == DSO__ORIG_KERNEL) { | 1011 | if (dso->origin == DSO__ORIG_KERNEL) { |
1012 | if (dso->annotate_warned) { | 1012 | if (dso->annotate_warned) |
1013 | err = 0; | ||
1014 | goto out_free_filename; | 1013 | goto out_free_filename; |
1015 | } | 1014 | err = -ENOENT; |
1016 | dso->annotate_warned = 1; | 1015 | dso->annotate_warned = 1; |
1017 | pr_err("Can't annotate %s: No vmlinux file was found in the " | 1016 | pr_err("Can't annotate %s: No vmlinux file was found in the " |
1018 | "path:\n", sym->name); | 1017 | "path\n", sym->name); |
1019 | vmlinux_path__fprintf(stderr); | ||
1020 | goto out_free_filename; | 1018 | goto out_free_filename; |
1021 | } | 1019 | } |
1022 | 1020 | ||
@@ -1046,7 +1044,6 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head) | |||
1046 | break; | 1044 | break; |
1047 | 1045 | ||
1048 | pclose(file); | 1046 | pclose(file); |
1049 | err = 0; | ||
1050 | out_free_filename: | 1047 | out_free_filename: |
1051 | if (dso->has_build_id) | 1048 | if (dso->has_build_id) |
1052 | free(filename); | 1049 | free(filename); |