[profile]: [12/23] ppc64 profiling cleanups

From: William Lee Irwin III
Date: Tue Jun 22 2004 - 11:16:25 EST


Convert ppc64 to use profiling_on() and profile_tick().

Index: prof-2.6.7/arch/ppc64/kernel/time.c
===================================================================
--- prof-2.6.7.orig/arch/ppc64/kernel/time.c 2004-06-15 22:20:03.000000000 -0700
+++ prof-2.6.7/arch/ppc64/kernel/time.c 2004-06-22 07:25:53.213073552 -0700
@@ -112,36 +112,16 @@
*/
static inline void ppc64_do_profile(struct pt_regs *regs)
{
- unsigned long nip;
extern unsigned long prof_cpu_mask;

profile_hook(regs);

- if (user_mode(regs))
- return;
-
- if (!prof_buffer)
- return;
-
- nip = instruction_pointer(regs);
-
/*
* Only measure the CPUs specified by /proc/irq/prof_cpu_mask.
* (default is all CPUs.)
*/
- if (!((1<<smp_processor_id()) & prof_cpu_mask))
- return;
-
- nip -= (unsigned long)_stext;
- nip >>= prof_shift;
- /*
- * Don't ignore out-of-bounds EIP values silently,
- * put them into the last histogram slot, so if
- * present, they will show up as a sharp peak.
- */
- if (nip > prof_len-1)
- nip = prof_len-1;
- atomic_inc((atomic_t *)&prof_buffer[nip]);
+ if (!user_mode(regs) && ((1<<smp_processor_id()) & prof_cpu_mask))
+ profile_tick(instruction_pointer(regs));
}

static __inline__ void timer_check_rtc(void)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/