[Cbe-oss-dev] [PATCH] OProfile: capture data for generated code stubs
Bob Nelson
rrnelson at linux.vnet.ibm.com
Thu May 3 08:03:02 EST 2007
The SPU runtime sometimes creates code stubs on the stack.
Previously the CBE OProfile module would discard entries
captured for these code stubs because the address does not
appear in the memory map for the running program.
This change keeps these entries for reporting by the user space tools.
Signed-off-by: Bob Nelson <rrnelson at us.ibm.com>
--- linux-2.6.21-rc7.orig/arch/powerpc/oprofile/cell/vma_map.c
+++ linux-2.6.21-rc7/arch/powerpc/oprofile/cell/vma_map.c
@@ -36,7 +36,11 @@ unsigned int
vma_map_lookup(struct vma_to_fileoffset_map *map, unsigned int vma,
const struct spu * aSpu, int * grd_val)
{
- u32 offset = 0xffffffff;
+ /* Default the offset to a flagged value. Addresses of
+ * dynamically generated code (can't be found in the vma map)
+ * will be sent on to the user space tools for reporting.
+ */
+ u32 offset = 0x10000000 + vma;
u32 ovly_grd;
for (; map; map = map->next) {
if (vma < map->vma || vma >= map->vma + map->size)
More information about the cbe-oss-dev
mailing list