aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-01-24 10:10:42 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-04-01 11:22:15 -0400
commit62667746a6ded2a1fc8dac2e6258f46150b5e46c (patch)
treea04935f4a8ed047c790ac24c2b452801651150dd
parentbad4091791b0bb8c2d7919ddefe2f0d109299b5a (diff)
perf tools: Fix output of symbol_daddr offset
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>
-rw-r--r--tools/perf/util/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 32a1ef15912c..5f52d492590c 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -202,7 +202,7 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
202 if (map->type == MAP__VARIABLE) { 202 if (map->type == MAP__VARIABLE) {
203 ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name); 203 ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name);
204 ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx", 204 ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx",
205 ip - sym->start); 205 ip - map->unmap_ip(map, sym->start));
206 ret += repsep_snprintf(bf + ret, size - ret, "%-*s", 206 ret += repsep_snprintf(bf + ret, size - ret, "%-*s",
207 width - ret, ""); 207 width - ret, "");
208 } else { 208 } else {