--- 2.3.48/include/asm-i386/hw_irq.h Sun Feb 27 06:19:44 2000 +++ /tmp/hw_irq.h Sun Feb 27 20:06:01 2000 @@ -186,6 +186,9 @@ */ static inline void x86_do_profile (unsigned long eip) { + if (prof_buffer) + return; + /* * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. * (default is all CPUs.) @@ -193,18 +196,16 @@ if (!((1<>= 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 (eip > prof_len-1) - eip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[eip]); - } + eip -= (unsigned long) &_stext; + eip >>= 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 (eip > prof_len-1) + eip = prof_len-1; + atomic_inc((atomic_t *)&prof_buffer[eip]); } #ifdef __SMP__ /*more of this file should probably be ifdefed SMP */