summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
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/i386/include/mptable.h
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/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 39d10d6..7960c51 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -63,6 +63,7 @@
#include <machine/apic.h>
#include <machine/atomic.h>
+#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/mpapic.h>
@@ -2603,17 +2604,17 @@ ap_init(void)
* For statclock, we send an IPI to all CPU's to have them call this
* function.
*
- * WARNING! unpend() will call statclock_process() directly and skip this
+ * WARNING! unpend() will call statclock() directly and skip this
* routine.
*/
void
-forwarded_statclock(struct trapframe frame)
+forwarded_statclock(struct clockframe frame)
{
- mtx_lock_spin(&sched_lock);
- statclock_process(curthread->td_kse, TRAPF_PC(&frame),
- TRAPF_USERMODE(&frame));
- mtx_unlock_spin(&sched_lock);
+ if (profprocs != 0)
+ profclock(&frame);
+ if (pscnt == psdiv)
+ statclock(&frame);
}
void
@@ -2642,12 +2643,10 @@ forward_statclock(void)
* routine.
*/
void
-forwarded_hardclock(struct trapframe frame)
+forwarded_hardclock(struct clockframe frame)
{
- mtx_lock_spin(&sched_lock);
- hardclock_process(curthread, TRAPF_USERMODE(&frame));
- mtx_unlock_spin(&sched_lock);
+ hardclock_process(&frame);
}
void
OpenPOWER on IntegriCloud