PERFORCE change 131409 for review
John Birrell
jb at FreeBSD.org
Fri Dec 21 20:33:07 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131409
Change 131409 by jb at jb_freebsd1 on 2007/12/22 04:32:34
Add the cyclic timer hook.
Affected files ...
.. //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#11 edit
Differences ...
==== //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#11 (text+ko) ====
@@ -35,6 +35,7 @@
__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.43 2007/10/27 13:34:53 jhb Exp $");
#include "opt_hwpmc_hooks.h"
+#include "opt_kdtrace.h"
#include "opt_ddb.h"
@@ -65,6 +66,11 @@
#include <ddb/ddb.h>
#endif
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+cyclic_clock_func_t lapic_cyclic_clock_func;
+#endif
+
/* Sanity checks on IDT vectors. */
CTASSERT(APIC_IO_INTS + APIC_NUM_IOINTS == APIC_TIMER_INT);
CTASSERT(APIC_TIMER_INT < APIC_LOCAL_INTS);
@@ -676,6 +682,19 @@
hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
else
hardclock_cpu(TRAPF_USERMODE(frame));
+
+#ifdef KDTRACE_HOOKS
+ /*
+ * If the DTrace hooks are configured and a callback
+ * function has been registered, then call it to process
+ * the high speed timers. If this function is registered
+ * here, then there mustn't be a High Performance Event
+ * Timer (HPET) on the CPU. A HPET provides higher
+ * performance timer interrupts.
+ */
+ if (lapic_cyclic_clock_func != NULL)
+ (*lapic_cyclic_clock_func)();
+#endif
}
/* Fire statclock at stathz. */
More information about the p4-projects
mailing list