Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673267 > unrolled thread

[PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address

Started byNamhyung Kim <namhyung@kernel.org>
First post2017-06-23 07:50 +0200
Last post2017-06-23 07:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address Namhyung Kim <namhyung@kernel.org> - 2017-06-23 07:50 +0200

#1673267 — [PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address

FromNamhyung Kim <namhyung@kernel.org>
Date2017-06-23 07:50 +0200
Subject[PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address
Message-ID<tVpDH-6AF-3@gated-at.bofh.it>
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 <adrian.hunter@intel.com>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web