perf report: Output more symbol related debug data
tip-bot for Peter Zijlstra
maintainerCommit-ID: 520f2c346af463fa00924b236e092da482b344cc Gitweb: http://git.kernel.org/tip/520f2c346af463fa00924b236e092da482b344cc Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 22 Jun 2009 16:52:51 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 22 Jun 2009 17:02:07 +0200
perf report: Output more symbol related debug data
Print more symbol relocation related info under -vv.
Signed-off-by Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- tools/perf/builtin-report.c | 5 +++-- tools/perf/util/symbol.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-)
tools/perf/builtin-report.c +3 -2
@@ -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 @@ got_map: dso = kernel_dso; }dprintf (" ...... dso: %s\n" , dso ? dso->name :"<not found>" ); +dprintf (" ...... map: %Lx -> %Lx\n" , *ipp, ip); + *ipp = ip;if (dsop) *dsop = dso;
tools/perf/util/symbol.c +4 -0
@@ -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,