aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index cc6628630303..fa20345a0ab0 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -141,7 +141,8 @@ static void parse_source(struct sym_entry *syme)
141 sprintf(command, 141 sprintf(command,
142 "objdump --start-address=0x%016Lx " 142 "objdump --start-address=0x%016Lx "
143 "--stop-address=0x%016Lx -dS %s", 143 "--stop-address=0x%016Lx -dS %s",
144 sym->start, sym->end, path); 144 map->unmap_ip(map, sym->start),
145 map->unmap_ip(map, sym->end), path);
145 146
146 file = popen(command, "r"); 147 file = popen(command, "r");
147 if (!file) 148 if (!file)
@@ -173,11 +174,11 @@ static void parse_source(struct sym_entry *syme)
173 174
174 if (strlen(src->line)>8 && src->line[8] == ':') { 175 if (strlen(src->line)>8 && src->line[8] == ':') {
175 src->eip = strtoull(src->line, NULL, 16); 176 src->eip = strtoull(src->line, NULL, 16);
176 src->eip += map->start; 177 src->eip = map->unmap_ip(map, src->eip);
177 } 178 }
178 if (strlen(src->line)>8 && src->line[16] == ':') { 179 if (strlen(src->line)>8 && src->line[16] == ':') {
179 src->eip = strtoull(src->line, NULL, 16); 180 src->eip = strtoull(src->line, NULL, 16);
180 src->eip += map->start; 181 src->eip = map->unmap_ip(map, src->eip);
181 } 182 }
182 } 183 }
183 pclose(file); 184 pclose(file);