[PATCH 1/3] perf: Correct final kernel map guesses

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ian Munsie
Date: Wednesday, November 24, 2010 - 9:12 pm

From: Ian Munsie <imunsie@au1.ibm.com>

If a 32bit userspace perf is running on a 64bit kernel, the end of the
final map in the kernel would incorrectly be set to 2^32-1 rather than
2^64-1.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
---
 tools/perf/util/event.c  |    2 +-
 tools/perf/util/symbol.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index bc47446..4283417 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -392,7 +392,7 @@ static void event_set_kernel_mmap_len(struct map **maps, event_t *self)
 	 * a zero sized synthesized MMAP event for the kernel.
 	 */
 	if (maps[MAP__FUNCTION]->end == 0)
-		maps[MAP__FUNCTION]->end = ~0UL;
+		maps[MAP__FUNCTION]->end = ~0ULL;
 }
 
 static int event__process_kernel_mmap(event_t *self,
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 0500895..a348906 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -121,7 +121,7 @@ static void __map_groups__fixup_end(struct map_groups *self, enum map_type type)
 	 * We still haven't the actual symbols, so guess the
 	 * last map final address.
 	 */
-	curr->end = ~0UL;
+	curr->end = ~0ULL;
 }
 
 static void map_groups__fixup_end(struct map_groups *self)
-- 
1.7.2.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] perf: Correct final kernel map guesses, Ian Munsie, (Wed Nov 24, 9:12 pm)
Re: [PATCH 2/3] perf: Allow strong and weak functions in L ..., Arnaldo Carvalho de Melo, (Fri Nov 26, 2:18 pm)
[tip:perf/core] perf symbols: Correct final kernel map guesses, tip-bot for Ian Munsie, (Sun Nov 28, 1:34 am)
Re: [PATCH 2/3] perf: Allow strong and weak functions in L ..., Arnaldo Carvalho de Melo, (Tue Dec 7, 7:55 am)
[tip:perf/core] perf makefile: Allow strong and weak funct ..., tip-bot for Ian Munsie, (Wed Dec 8, 12:39 am)
Re: [PATCH 3/3] perf, powerpc: Allow perf test to handle P ..., Arnaldo Carvalho de Melo, (Sun Dec 12, 7:39 am)