summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-02-03 17:53:15 +0000
committerjake <jake@FreeBSD.org>2003-02-03 17:53:15 +0000
commit6b3763a173b458d3138f8a5ae81d7574349cc99d (patch)
tree4ac2b707510b8d738855f9fa4a6576e6ded49a77 /sys/alpha
parent9689f0580db3e8ffcfba46b99c0b3a370eb9524c (diff)
downloadFreeBSD-src-6b3763a173b458d3138f8a5ae81d7574349cc99d.zip
FreeBSD-src-6b3763a173b458d3138f8a5ae81d7574349cc99d.tar.gz
Split statclock into statclock and profclock, and made the method for driving
statclock based on profhz when profiling is enabled MD, since most platforms don't use this anyway. This removes the need for statclock_process, whose only purpose was to subdivide profhz, and gets the profiling clock running outside of sched_lock on platforms that implement suswintr. Also changed the interface for starting and stopping the profiling clock to do just that, instead of changing the rate of statclock, since they can now be separate. Reviewed by: jhb, tmm Tested on: i386, sparc64
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/clock.c17
-rw-r--r--sys/alpha/alpha/interrupt.c17
2 files changed, 19 insertions, 15 deletions
diff --git a/sys/alpha/alpha/clock.c b/sys/alpha/alpha/clock.c
index 2d34a99..3b113d7 100644
--- a/sys/alpha/alpha/clock.c
+++ b/sys/alpha/alpha/clock.c
@@ -446,17 +446,18 @@ handleclock(void *arg)
hardclock(arg);
}
-/*
- * We assume newhz is either stathz or profhz, and that neither will
- * change after being set up above. Could recalculate intervals here
- * but that would be a drag.
- */
void
-setstatclockrate(newhz)
- int newhz;
+cpu_startprofclock(void)
+{
+
+ /* nothing to do */
+}
+
+void
+cpu_stopprofclock(void)
{
- /* nothing we can do */
+ /* nothing to do */
}
/*
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c
index 19cd144..88eba10 100644
--- a/sys/alpha/alpha/interrupt.c
+++ b/sys/alpha/alpha/interrupt.c
@@ -472,16 +472,19 @@ alpha_clock_interrupt(struct trapframe *framep)
#endif
(*platform.clockintr)(framep);
/* divide hz (1024) by 8 to get stathz (128) */
- if ((++schedclk2 & 0x7) == 0)
+ if ((++schedclk2 & 0x7) == 0) {
+ if (profprocs != 0)
+ profclock((struct clockframe *)framep);
statclock((struct clockframe *)framep);
+ }
#ifdef SMP
} else {
- mtx_lock_spin(&sched_lock);
- hardclock_process(curthread, TRAPF_USERMODE(framep));
- if ((schedclk2 & 0x7) == 0)
- statclock_process(curkse, TRAPF_PC(framep),
- TRAPF_USERMODE(framep));
- mtx_unlock_spin(&sched_lock);
+ hardclock_process((struct clockframe *)framep);
+ if ((schedclk2 & 0x7) == 0) {
+ if (profprocs != 0)
+ profclock((struct clockframe *)framep);
+ statclock((struct clockframe *)framep);
+ }
}
#endif
critical_exit();
OpenPOWER on IntegriCloud