Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753664Ab2KGH1c (ORCPT ); Wed, 7 Nov 2012 02:27:32 -0500 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:50186 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106Ab2KGH11 (ORCPT ); Wed, 7 Nov 2012 02:27:27 -0500 X-AuditID: 9c930179-b7c8bae000003559-77-509a0d5b8356 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , LKML , Stephane Eranian , Andi Kleen , Namhyung Kim Subject: [PATCH 5/6] perf tools: Fix output of symbol_daddr offset Date: Wed, 7 Nov 2012 16:27:13 +0900 Message-Id: <1352273234-28912-6-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1352273234-28912-1-git-send-email-namhyung@kernel.org> References: <1352273234-28912-1-git-send-email-namhyung@kernel.org> X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 33 From: Namhyung Kim The symbol addresses in a dso have relative offsets from the start of a mapping. So in order to ouput correct offset value from @ip, one of them should be converted. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index e2e466d24c16..166480ca2865 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -186,7 +186,7 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym, if (map->type == MAP__VARIABLE) { ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name); ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx", - ip - sym->start); + ip - map->unmap_ip(map, sym->start)); ret += repsep_snprintf(bf + ret, size - ret, "%-*s", width - ret, ""); } else { -- 1.7.11.7 -- 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/