Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c88e4bf6 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar
Browse files

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: default avatarMike Galbraith <efault@gmx.de>
Signed-off-by: default avatarArnaldo 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: default avatarIngo Molnar <mingo@elte.hu>
parent 8f0b0373
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ static void parse_source(struct sym_entry *syme)
	sprintf(command,
		"objdump --start-address=0x%016Lx "
			 "--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");
	if (!file)
@@ -173,11 +174,11 @@ static void parse_source(struct sym_entry *syme)

		if (strlen(src->line)>8 && src->line[8] == ':') {
			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] == ':') {
			src->eip = strtoull(src->line, NULL, 16);
			src->eip += map->start;
			src->eip = map->unmap_ip(map, src->eip);
		}
	}
	pclose(file);