diff options
author | jake <jake@FreeBSD.org> | 2003-02-03 17:53:15 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-02-03 17:53:15 +0000 |
commit | 6b3763a173b458d3138f8a5ae81d7574349cc99d (patch) | |
tree | 4ac2b707510b8d738855f9fa4a6576e6ded49a77 /sys/pc98/cbus/pcrtc.c | |
parent | 9689f0580db3e8ffcfba46b99c0b3a370eb9524c (diff) | |
download | FreeBSD-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/pc98/cbus/pcrtc.c')
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 557afe8..8e2dc97 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -140,6 +140,8 @@ static void setup_8254_mixed_mode(void); int adjkerntz; /* local offset from GMT in seconds */ int clkintr_pending; int disable_rtc_set; /* disable resettodr() if != 0 */ +int pscnt = 1; +int psdiv = 1; int statclock_disable; #ifndef TIMER_FREQ #ifdef PC98 @@ -441,7 +443,13 @@ static void rtcintr(struct clockframe frame) { while (rtcin(RTC_INTR) & RTCIR_PERIOD) { - statclock(&frame); + if (profprocs != 0) { + if (--pscnt == 0) + pscnt = psdiv; + profclock(&frame); + } + if (pscnt == psdiv) + statclock(&frame); #ifdef SMP forward_statclock(); #endif @@ -1518,7 +1526,7 @@ setup_8254_mixed_mode() #endif void -setstatclockrate(int newhz) +cpu_startprofclock(void) { #ifndef PC98 if (newhz == RTC_PROFRATE) @@ -1529,6 +1537,11 @@ setstatclockrate(int newhz) #endif } +void +cpu_stopprofclock(void) +{ +} + static int sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) { |