]> git.karo-electronics.de Git - linux-beck.git/commitdiff
perf symbols: Correct final kernel map guesses
authorIan Munsie <imunsie@au1.ibm.com>
Thu, 25 Nov 2010 04:12:53 +0000 (15:12 +1100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 27 Nov 2010 03:32:53 +0000 (01:32 -0200)
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.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290658375-10342-1-git-send-email-imunsie@au1.ibm.com>
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c
tools/perf/util/symbol.c

index dab9e754a28103b1727d6dee29669aaa2d7f89da..7260db75b93d6f2329f4e9083fbc68093963ae36 100644 (file)
@@ -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,
index 0500895a45af530bf52dc949551ed73690978c61..a348906b587d7d369d1ed69d0d862d1d2774f396 100644 (file)
@@ -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)