Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbZJXBJl (ORCPT ); Fri, 23 Oct 2009 21:09:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753123AbZJXBEf (ORCPT ); Fri, 23 Oct 2009 21:04:35 -0400 Received: from hera.kernel.org ([140.211.167.34]:51678 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753077AbZJXBEc (ORCPT ); Fri, 23 Oct 2009 21:04:32 -0400 Date: Sat, 24 Oct 2009 01:03:49 GMT From: tip-bot for Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com, hpa@zytor.com, mingo@redhat.com, peterz@infradead.org, efault@gmx.de, fweisbec@gmail.com, tglx@linutronix.de, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, acme@redhat.com, paulus@samba.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, efault@gmx.de, peterz@infradead.org, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <1256061295-19835-1-git-send-email-acme@redhat.com> References: <1256061295-19835-1-git-send-email-acme@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:branch?] perf top: Fix symbol annotation Message-ID: Git-Commit-ID: c88e4bf60de6253a048cf4e6b3b0715e543e0460 X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2096 Lines: 57 Commit-ID: c88e4bf60de6253a048cf4e6b3b0715e543e0460 Gitweb: http://git.kernel.org/tip/c88e4bf60de6253a048cf4e6b3b0715e543e0460 Author: Arnaldo Carvalho de Melo AuthorDate: Tue, 20 Oct 2009 15:54:55 -0200 Committer: Ingo Molnar CommitDate: Tue, 20 Oct 2009 21:12:59 +0200 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: Mike Galbraith Signed-off-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1256061295-19835-1-git-send-email-acme@redhat.com> Signed-off-by: Ingo Molnar --- tools/perf/builtin-top.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index cc66286..fa20345 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) 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/