aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index af5805f51314..138e3cb2b727 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -222,3 +222,11 @@ u64 map__rip_2objdump(struct map *map, u64 rip)
222 rip; 222 rip;
223 return addr; 223 return addr;
224} 224}
225
226u64 map__objdump_2ip(struct map *map, u64 addr)
227{
228 u64 ip = map->dso->adjust_symbols ?
229 addr :
230 map->unmap_ip(map, addr); /* RIP -> IP */
231 return ip;
232}