From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754488AbdFWFsi (ORCPT ); Fri, 23 Jun 2017 01:48:38 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:44247 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754312AbdFWFsd (ORCPT ); Fri, 23 Jun 2017 01:48:33 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , kernel-team@lge.com, Masami Hiramatsu , Andi Kleen , Adrian Hunter , Wang Nan Subject: [PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address Date: Fri, 23 Jun 2017 14:48:19 +0900 Message-Id: <20170623054827.3828-2-namhyung@kernel.org> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170623054827.3828-1-namhyung@kernel.org> References: <20170623054827.3828-1-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A symbol address is relative in a map/dso, to setup modules addresses it should be converted to absolute address. Note that it only used for kernel mappings which uses identity map but theorically it should unmap the address IMHO. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/util/map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 2179b2deb730..4867265b800a 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -265,7 +265,7 @@ void map__fixup_start(struct map *map) struct rb_node *nd = rb_first(symbols); if (nd != NULL) { struct symbol *sym = rb_entry(nd, struct symbol, rb_node); - map->start = sym->start; + map->start = map->unmap_ip(map, sym->start); } } @@ -275,7 +275,7 @@ void map__fixup_end(struct map *map) struct rb_node *nd = rb_last(symbols); if (nd != NULL) { struct symbol *sym = rb_entry(nd, struct symbol, rb_node); - map->end = sym->end; + map->end = map->unmap_ip(map, sym->end); } } -- 2.13.1