Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2002 20:21:32 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 16739 for review
Message-ID:  <200208290321.g7T3LWmo060749@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16739

Change 16739 by peter@peter_mckinley on 2002/08/28 20:21:10

	record per-cpu interrupt counts and export it via sysctl arrays.

Affected files ...

.. //depot/projects/ia64/sys/ia64/ia64/interrupt.c#14 edit

Differences ...

==== //depot/projects/ia64/sys/ia64/ia64/interrupt.c#14 (text+ko) ====

@@ -50,6 +50,7 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/smp.h>
+#include <sys/sysctl.h>
 
 #include <machine/clock.h>
 #include <machine/cpu.h>
@@ -86,6 +87,15 @@
 void (*perf_irq)(unsigned long, struct trapframe *) = dummy_perf;
 
 
+static unsigned int	ints[MAXCPU];
+static unsigned int	clks[MAXCPU];
+static unsigned int	asts[MAXCPU];
+static unsigned int	rdvs[MAXCPU];
+SYSCTL_OPAQUE(_debug, OID_AUTO, ints, CTLFLAG_RW, &ints, sizeof(ints), "IU", "");
+SYSCTL_OPAQUE(_debug, OID_AUTO, clks, CTLFLAG_RW, &clks, sizeof(clks), "IU", "");
+SYSCTL_OPAQUE(_debug, OID_AUTO, asts, CTLFLAG_RW, &asts, sizeof(asts), "IU", "");
+SYSCTL_OPAQUE(_debug, OID_AUTO, rdvs, CTLFLAG_RW, &rdvs, sizeof(rdvs), "IU", "");
+
 static u_int schedclk2;
 
 void
@@ -118,6 +128,7 @@
 #endif
 		critical_enter();
 #ifdef SMP
+		clks[PCPU_GET(cpuid)]++;
 		/* Only the BSP runs the real clock */
 		if (PCPU_GET(cpuid) == 0) {
 #endif
@@ -139,8 +150,10 @@
 		critical_exit();
 #ifdef SMP
 	} else if (vector == ipi_vector[IPI_AST]) {
+		asts[PCPU_GET(cpuid)]++;
 		CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid));
 	} else if (vector == ipi_vector[IPI_RENDEZVOUS]) {
+		rdvs[PCPU_GET(cpuid)]++;
 		CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid));
 		smp_rendezvous_action();
 	} else if (vector == ipi_vector[IPI_STOP]) {
@@ -162,8 +175,10 @@
 		CTR1(KTR_SMP, "IPI_TEST, cpuid=%d", PCPU_GET(cpuid));
 		mp_ipi_test++;
 #endif
-	} else
+	} else {
+		ints[PCPU_GET(cpuid)]++;
 		ia64_dispatch_intr(framep, vector);
+	}
 
  out:
 	atomic_subtract_int(&td->td_intr_nesting_level, 1);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208290321.g7T3LWmo060749>