[Cbe-oss-dev] [PATCH] OProfile - Enable callgraph support for Cell

Bob Nelson rrnelson at linux.vnet.ibm.com
Sat Jan 26 07:35:48 EST 2008


This patch enables OProfile callgraph support for the Cell processor.  The
original code was just calling a function to add the PC value, now it will
call a function that first checks the callgraph depth.  Callgraph is already
enabled on the other Power platforms.

Signed-off-by: Bob Nelson <rrnelson at us.ibm.com>

Index: linux-2.6/arch/powerpc/oprofile/op_model_cell.c
===================================================================
--- linux-2.6.orig/arch/powerpc/oprofile/op_model_cell.c
+++ linux-2.6/arch/powerpc/oprofile/op_model_cell.c
@@ -1149,7 +1149,7 @@ static void cell_handle_interrupt(struct
                for (i = 0; i < num_counters; ++i) {
                        if ((interrupt_mask & CBE_PM_CTR_OVERFLOW_INTR(i))
                            && ctr[i].enabled) {
-                               oprofile_add_pc(pc, is_kernel, i);
+                               oprofile_add_ext_sample(pc, regs, i, is_kernel);
                                cbe_write_ctr(cpu, i, reset_value[i]);
                        }
                }



More information about the cbe-oss-dev mailing list