From owner-p4-projects@FreeBSD.ORG Sat Dec 22 04:33:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE5FA16A46B; Sat, 22 Dec 2007 04:33:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9214116A419 for ; Sat, 22 Dec 2007 04:33:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 754AD13C478 for ; Sat, 22 Dec 2007 04:33:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lBM4X6CU015432 for ; Sat, 22 Dec 2007 04:33:06 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBM4X6am015428 for perforce@freebsd.org; Sat, 22 Dec 2007 04:33:06 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Dec 2007 04:33:06 GMT Message-Id: <200712220433.lBM4X6am015428@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 131409 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2007 04:33:07 -0000 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 #endif +#ifdef KDTRACE_HOOKS +#include +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. */