[profile]: [6/23] sparc32 profiling cleanups

From: William Lee Irwin III
Date: Tue Jun 22 2004 - 10:35:13 EST


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

Index: prof-2.6.7/arch/sparc/kernel/time.c
===================================================================
--- prof-2.6.7.orig/arch/sparc/kernel/time.c 2004-06-15 22:19:36.000000000 -0700
+++ prof-2.6.7/arch/sparc/kernel/time.c 2004-06-22 07:25:48.065856048 -0700
@@ -84,7 +84,7 @@
/* 32-bit Sparc specific profiling function. */
void sparc_do_profile(unsigned long pc, unsigned long o7)
{
- if(prof_buffer && current->pid) {
+ if(profiling_on() && current->pid) {
extern int _stext;
extern int __copy_user_begin, __copy_user_end;
extern int __atomic_begin, __atomic_end;
@@ -101,14 +101,8 @@
pc < (unsigned long) &__bitops_end))
pc = o7;

- pc -= (unsigned long) &_stext;
- pc >>= prof_shift;
-
spin_lock(&ticker_lock);
- if(pc < prof_len)
- prof_buffer[pc]++;
- else
- prof_buffer[prof_len - 1]++;
+ profile_tick(pc);
spin_unlock(&ticker_lock);
}
}
-
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/