Subject: oprofile: capture data for generated code stubs From: Bob Nelson 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 Signed-off-by: Arnd Bergmann Index: linux-2.6/arch/powerpc/oprofile/cell/vma_map.c =================================================================== --- linux-2.6.orig/arch/powerpc/oprofile/cell/vma_map.c +++ linux-2.6/arch/powerpc/oprofile/cell/vma_map.c @@ -36,7 +36,12 @@ 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)