Date: Sat, 22 Dec 2007 04:33:06 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 131409 for review Message-ID: <200712220433.lBM4X6am015428@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131409 Change 131409 by jb@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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712220433.lBM4X6am015428>