提交 c88e4bf6 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

perf top: Fix symbol annotation

We need to use map->unmap_ip() here too to match section
relative symbol address to the absolute address needed to match
objdump -dS addresses.
Reported-by: NMike Galbraith <efault@gmx.de>
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1256061295-19835-1-git-send-email-acme@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 8f0b0373
...@@ -141,7 +141,8 @@ static void parse_source(struct sym_entry *syme) ...@@ -141,7 +141,8 @@ static void parse_source(struct sym_entry *syme)
sprintf(command, sprintf(command,
"objdump --start-address=0x%016Lx " "objdump --start-address=0x%016Lx "
"--stop-address=0x%016Lx -dS %s", "--stop-address=0x%016Lx -dS %s",
sym->start, sym->end, path); map->unmap_ip(map, sym->start),
map->unmap_ip(map, sym->end), path);
file = popen(command, "r"); file = popen(command, "r");
if (!file) if (!file)
...@@ -173,11 +174,11 @@ static void parse_source(struct sym_entry *syme) ...@@ -173,11 +174,11 @@ static void parse_source(struct sym_entry *syme)
if (strlen(src->line)>8 && src->line[8] == ':') { if (strlen(src->line)>8 && src->line[8] == ':') {
src->eip = strtoull(src->line, NULL, 16); src->eip = strtoull(src->line, NULL, 16);
src->eip += map->start; src->eip = map->unmap_ip(map, src->eip);
} }
if (strlen(src->line)>8 && src->line[16] == ':') { if (strlen(src->line)>8 && src->line[16] == ':') {
src->eip = strtoull(src->line, NULL, 16); src->eip = strtoull(src->line, NULL, 16);
src->eip += map->start; src->eip = map->unmap_ip(map, src->eip);
} }
} }
pclose(file); pclose(file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册