From beddd6c197d23dc6466a1e3911955f6ddadfbb76 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 22 Jun 2009 16:52:51 +0200 Subject: [PATCH] --- yaml --- r: 154617 b: refs/heads/master c: 520f2c346af463fa00924b236e092da482b344cc h: refs/heads/master i: 154615: d63d54fa3622c594136c7b884eefaa14e3ae4564 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-report.c | 5 +++-- trunk/tools/perf/util/symbol.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a514df46d68a..a0fe9b764031 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74d5b5889ea71a95d8924c08f8a7c6e2bdcbc0ba +refs/heads/master: 520f2c346af463fa00924b236e092da482b344cc diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index 5eb5566f0c95..ec230a0146e9 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -797,7 +797,7 @@ resolve_symbol(struct thread *thread, struct map **mapp, { struct dso *dso = dsop ? *dsop : NULL; struct map *map = mapp ? *mapp : NULL; - uint64_t ip = *ipp; + u64 ip = *ipp; if (!thread) return NULL; @@ -814,7 +814,6 @@ resolve_symbol(struct thread *thread, struct map **mapp, *mapp = map; got_map: ip = map->map_ip(map, ip); - *ipp = ip; dso = map->dso; } else { @@ -828,6 +827,8 @@ resolve_symbol(struct thread *thread, struct map **mapp, dso = kernel_dso; } dprintf(" ...... dso: %s\n", dso ? dso->name : ""); + dprintf(" ...... map: %Lx -> %Lx\n", *ipp, ip); + *ipp = ip; if (dsop) *dsop = dso; diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index 01b62fa03996..9c659ef6aec2 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -535,6 +535,10 @@ static int dso__load_sym(struct dso *self, int fd, const char *name, gelf_getshdr(sec, &shdr); obj_start = sym.st_value; + if (verbose >= 2) + printf("adjusting symbol: st_value: %Lx sh_addr: %Lx sh_offset: %Lx\n", + (u64)sym.st_value, (u64)shdr.sh_addr, (u64)shdr.sh_offset); + sym.st_value -= shdr.sh_addr - shdr.sh_offset; f = symbol__new(sym.st_value, sym.st_size,