diff options
-rw-r--r-- | tools/perf/util/symbol.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 381999dd5c1f..71d23e1e30e8 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1608,11 +1608,11 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map, | |||
1608 | u8 kallsyms_build_id[BUILD_ID_SIZE]; | 1608 | u8 kallsyms_build_id[BUILD_ID_SIZE]; |
1609 | 1609 | ||
1610 | if (sysfs__read_build_id("/sys/kernel/notes", kallsyms_build_id, | 1610 | if (sysfs__read_build_id("/sys/kernel/notes", kallsyms_build_id, |
1611 | sizeof(kallsyms_build_id)) == 0) | 1611 | sizeof(kallsyms_build_id)) == 0) { |
1612 | 1612 | is_kallsyms = dso__build_id_equal(self, kallsyms_build_id); | |
1613 | is_kallsyms = dso__build_id_equal(self, kallsyms_build_id); | 1613 | if (is_kallsyms) |
1614 | if (is_kallsyms) | 1614 | goto do_kallsyms; |
1615 | goto do_kallsyms; | 1615 | } |
1616 | goto do_vmlinux; | 1616 | goto do_vmlinux; |
1617 | } | 1617 | } |
1618 | 1618 | ||
@@ -1623,6 +1623,9 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map, | |||
1623 | do_vmlinux: | 1623 | do_vmlinux: |
1624 | err = dso__load_vmlinux(self, map, session, self->long_name, filter); | 1624 | err = dso__load_vmlinux(self, map, session, self->long_name, filter); |
1625 | if (err <= 0) { | 1625 | if (err <= 0) { |
1626 | if (self->has_build_id) | ||
1627 | return -1; | ||
1628 | |||
1626 | pr_info("The file %s cannot be used, " | 1629 | pr_info("The file %s cannot be used, " |
1627 | "trying to use /proc/kallsyms...", self->long_name); | 1630 | "trying to use /proc/kallsyms...", self->long_name); |
1628 | do_kallsyms: | 1631 | do_kallsyms: |