diff options
author | Peter Zijlstra <peterz@infradead.org> | 2009-06-22 10:52:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-22 11:02:07 -0400 |
commit | 520f2c346af463fa00924b236e092da482b344cc (patch) | |
tree | 7ff2f8277c1c56cd93f32062bb065f0ea44d7d3f /tools/perf | |
parent | 74d5b5889ea71a95d8924c08f8a7c6e2bdcbc0ba (diff) |
perf report: Output more symbol related debug data
Print more symbol relocation related info under -vv.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-report.c | 5 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 5eb5566f0c95..ec230a0146e9 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -797,7 +797,7 @@ resolve_symbol(struct thread *thread, struct map **mapp, | |||
797 | { | 797 | { |
798 | struct dso *dso = dsop ? *dsop : NULL; | 798 | struct dso *dso = dsop ? *dsop : NULL; |
799 | struct map *map = mapp ? *mapp : NULL; | 799 | struct map *map = mapp ? *mapp : NULL; |
800 | uint64_t ip = *ipp; | 800 | u64 ip = *ipp; |
801 | 801 | ||
802 | if (!thread) | 802 | if (!thread) |
803 | return NULL; | 803 | return NULL; |
@@ -814,7 +814,6 @@ resolve_symbol(struct thread *thread, struct map **mapp, | |||
814 | *mapp = map; | 814 | *mapp = map; |
815 | got_map: | 815 | got_map: |
816 | ip = map->map_ip(map, ip); | 816 | ip = map->map_ip(map, ip); |
817 | *ipp = ip; | ||
818 | 817 | ||
819 | dso = map->dso; | 818 | dso = map->dso; |
820 | } else { | 819 | } else { |
@@ -828,6 +827,8 @@ got_map: | |||
828 | dso = kernel_dso; | 827 | dso = kernel_dso; |
829 | } | 828 | } |
830 | dprintf(" ...... dso: %s\n", dso ? dso->name : "<not found>"); | 829 | dprintf(" ...... dso: %s\n", dso ? dso->name : "<not found>"); |
830 | dprintf(" ...... map: %Lx -> %Lx\n", *ipp, ip); | ||
831 | *ipp = ip; | ||
831 | 832 | ||
832 | if (dsop) | 833 | if (dsop) |
833 | *dsop = dso; | 834 | *dsop = dso; |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 01b62fa03996..9c659ef6aec2 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -535,6 +535,10 @@ static int dso__load_sym(struct dso *self, int fd, const char *name, | |||
535 | gelf_getshdr(sec, &shdr); | 535 | gelf_getshdr(sec, &shdr); |
536 | obj_start = sym.st_value; | 536 | obj_start = sym.st_value; |
537 | 537 | ||
538 | if (verbose >= 2) | ||
539 | printf("adjusting symbol: st_value: %Lx sh_addr: %Lx sh_offset: %Lx\n", | ||
540 | (u64)sym.st_value, (u64)shdr.sh_addr, (u64)shdr.sh_offset); | ||
541 | |||
538 | sym.st_value -= shdr.sh_addr - shdr.sh_offset; | 542 | sym.st_value -= shdr.sh_addr - shdr.sh_offset; |
539 | 543 | ||
540 | f = symbol__new(sym.st_value, sym.st_size, | 544 | f = symbol__new(sym.st_value, sym.st_size, |