Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun3 Count clock interrupts.



details:   https://anonhg.NetBSD.org/src/rev/3586fd2a5702
branches:  trunk
changeset: 552270:3586fd2a5702
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Sep 22 17:53:46 2003 +0000

description:
Count clock interrupts.
clock_intr() functions on sun3 are called directly without dispatchers.

XXX should use evcnt(9)?

diffstat:

 sys/arch/sun3/sun3/clock.c  |  11 +++++++++--
 sys/arch/sun3/sun3x/clock.c |  11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (92 lines):

diff -r 8718aa3973f3 -r 3586fd2a5702 sys/arch/sun3/sun3/clock.c
--- a/sys/arch/sun3/sun3/clock.c        Mon Sep 22 17:26:14 2003 +0000
+++ b/sys/arch/sun3/sun3/clock.c        Mon Sep 22 17:53:46 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.52 2003/09/22 16:54:14 tsutsui Exp $       */
+/*     $NetBSD: clock.c,v 1.53 2003/09/22 17:53:46 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2003/09/22 16:54:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.53 2003/09/22 17:53:46 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,6 +91,8 @@
 #include <sys/kernel.h>
 #include <sys/device.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <m68k/asm_single.h>
 
 #include <machine/autoconf.h>
@@ -104,6 +106,8 @@
 #include <dev/clock_subr.h>
 #include <dev/ic/intersil7170.h>
 
+extern int intrcnt[];
+
 #define        CLOCK_PRI       5
 #define IREG_CLK_BITS  (IREG_CLOCK_ENAB_7 | IREG_CLOCK_ENAB_5)
 
@@ -313,6 +317,9 @@
        /* Read the clock intr. reg. AGAIN! */
        intersil_clear();
 
+       intrcnt[CLOCK_PRI]++;
+       uvmexp.intrs++;
+
        { /* Entertainment! */
 #ifdef LED_IDLE_CHECK
                /* With this option, LEDs move only when CPU is idle. */
diff -r 8718aa3973f3 -r 3586fd2a5702 sys/arch/sun3/sun3x/clock.c
--- a/sys/arch/sun3/sun3x/clock.c       Mon Sep 22 17:26:14 2003 +0000
+++ b/sys/arch/sun3/sun3x/clock.c       Mon Sep 22 17:53:46 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.26 2003/09/22 17:21:51 tsutsui Exp $       */
+/*     $NetBSD: clock.c,v 1.27 2003/09/22 17:53:47 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.26 2003/09/22 17:21:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.27 2003/09/22 17:53:47 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -103,6 +103,8 @@
 #include <sys/kernel.h>
 #include <sys/device.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <m68k/asm_single.h>
 
 #include <machine/autoconf.h>
@@ -118,6 +120,8 @@
 
 #include <sun3/sun3x/mk48t02.h>
 
+extern int intrcnt[];
+
 #define SUN3_470       Yes
 
 #define        CLOCK_PRI       5
@@ -440,6 +444,9 @@
        }
 #endif /* SUN3_470 */
 
+       intrcnt[CLOCK_PRI]++;
+       uvmexp.intrs++;
+
        /* Entertainment! */
        if (cf.cf_pc == (long)_Idle)
                leds_intr();



Home | Main Index | Thread Index | Old Index