Skip to contentSkip to conversation

perf: addr2line wants addresses in same format as objdump

PATCH Applied David Miller 1 participant 2 messages Mar 25, 2012 – Mar 31, 2012 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 perf: addr2line wants addresses in same format as objdump

Therefore, in symbol__get_source_line(), use map__rip_2objdump instead of calling map->unmap_ip() unconditionally.

---
 tools/perf/util/annotate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/annotate.c +1 -1
index 734a503..26fa767 100644
@@ -410,7 +410,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
 	if (!notes->src->lines)
 		return -1;
 
-	start = map->unmap_ip(map, sym->start);
+	start = map__rip_2objdump(map, sym->start);
 
 	for (i = 0; i < len; i++) {
 		char *path = NULL;
Signature · 1 line
1.7.9.1
#1 lore raw

[tip:perf/urgent] perf annotate: addr2line wants addresses in same format as objdump

Commit-ID:  f40a06339fe6f4809b5851a74aae2c0dc4386e1b
Gitweb:     http://git.kernel.org/tip/f40a06339fe6f4809b5851a74aae2c0dc4386e1b
Author:     David Miller <[email protected]>
AuthorDate: Sun, 25 Mar 2012 16:28:12 -0400
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 28 Mar 2012 12:06:24 -0300

perf annotate: addr2line wants addresses in same format as objdump

Therefore, in symbol__get_source_line(), use map__rip_2objdump instead of calling map->unmap_ip() unconditionally.

---
 tools/perf/util/annotate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/annotate.c +1 -1
index e5a462f..31ba2a2 100644
@@ -408,7 +408,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
 	if (!notes->src->lines)
 		return -1;
 
-	start = map->unmap_ip(map, sym->start);
+	start = map__rip_2objdump(map, sym->start);
 
 	for (i = 0; i < len; i++) {
 		char *path = NULL;