patch-2.3.99-pre2 linux/include/asm-i386/hw_irq.h

Next file: linux/include/asm-i386/page.h
Previous file: linux/include/asm-arm/system.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre1/linux/include/asm-i386/hw_irq.h linux/include/asm-i386/hw_irq.h
@@ -189,6 +189,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.)
@@ -196,18 +199,16 @@
 	if (!((1<<smp_processor_id()) & prof_cpu_mask))
 		return;
 
-	if (prof_buffer) {
-		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]);
-	}
+	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 */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)