]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
perf tools: Fix output of symbol_daddr offset
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 24 Jan 2013 15:10:42 +0000 (16:10 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 1 Apr 2013 15:22:15 +0000 (12:22 -0300)
The symbol addresses in a dso have relative offsets from the start of a
mapping.  So in order to ouput correct offset value from @ip, one of
them should be converted.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1359040242-8269-19-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/sort.c

index 32a1ef15912c709bcde10a2ea257d0dcf9c8fa7f..5f52d492590c02dff879b4558b51b151dafe7204 100644 (file)
@@ -202,7 +202,7 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
                if (map->type == MAP__VARIABLE) {
                        ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name);
                        ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx",
-                                       ip - sym->start);
+                                       ip - map->unmap_ip(map, sym->start));
                        ret += repsep_snprintf(bf + ret, size - ret, "%-*s",
                                       width - ret, "");
                } else {