aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2010-07-30 08:36:08 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-30 08:54:41 -0400
commit8b1389ef93b36621c6acdeb623bd85aee3c405c9 (patch)
treedf30976f53d23d4c8c2bff3f52006d773f4c2690 /tools
parent21916c380d93ab59d6d07ee198fb31c8f1338e26 (diff)
perf tools: remove extra build-id check factored into dso__load
Signed-off-by: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b812ace91c60..e0d9480dc371 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -986,12 +986,12 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name,
986 986
987 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); 987 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
988 if (elf == NULL) { 988 if (elf == NULL) {
989 pr_err("%s: cannot read %s ELF file.\n", __func__, name); 989 pr_debug("%s: cannot read %s ELF file.\n", __func__, name);
990 goto out_close; 990 goto out_close;
991 } 991 }
992 992
993 if (gelf_getehdr(elf, &ehdr) == NULL) { 993 if (gelf_getehdr(elf, &ehdr) == NULL) {
994 pr_err("%s: cannot get elf header.\n", __func__); 994 pr_debug("%s: cannot get elf header.\n", __func__);
995 goto out_elf_end; 995 goto out_elf_end;
996 } 996 }
997 997
@@ -1710,30 +1710,6 @@ static int dso__load_vmlinux(struct dso *self, struct map *map,
1710{ 1710{
1711 int err = -1, fd; 1711 int err = -1, fd;
1712 1712
1713 if (self->has_build_id) {
1714 u8 build_id[BUILD_ID_SIZE];
1715
1716 if (filename__read_build_id(vmlinux, build_id,
1717 sizeof(build_id)) < 0) {
1718 pr_debug("No build_id in %s, ignoring it\n", vmlinux);
1719 return -1;
1720 }
1721 if (!dso__build_id_equal(self, build_id)) {
1722 char expected_build_id[BUILD_ID_SIZE * 2 + 1],
1723 vmlinux_build_id[BUILD_ID_SIZE * 2 + 1];
1724
1725 build_id__sprintf(self->build_id,
1726 sizeof(self->build_id),
1727 expected_build_id);
1728 build_id__sprintf(build_id, sizeof(build_id),
1729 vmlinux_build_id);
1730 pr_debug("build_id in %s is %s while expected is %s, "
1731 "ignoring it\n", vmlinux, vmlinux_build_id,
1732 expected_build_id);
1733 return -1;
1734 }
1735 }
1736
1737 fd = open(vmlinux, O_RDONLY); 1713 fd = open(vmlinux, O_RDONLY);
1738 if (fd < 0) 1714 if (fd < 0)
1739 return -1; 1715 return -1;