From owner-p4-projects@FreeBSD.ORG Mon Jan 28 01:15:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 495AA16A421; Mon, 28 Jan 2008 01:15:10 +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 EAE2116A419 for ; Mon, 28 Jan 2008 01:15:09 +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 C45B613C45A for ; Mon, 28 Jan 2008 01:15:09 +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 m0S1F9AG081639 for ; Mon, 28 Jan 2008 01:15:09 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0S1F9Ob081636 for perforce@freebsd.org; Mon, 28 Jan 2008 01:15:09 GMT (envelope-from jb@freebsd.org) Date: Mon, 28 Jan 2008 01:15:09 GMT Message-Id: <200801280115.m0S1F9Ob081636@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 134270 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: Mon, 28 Jan 2008 01:15:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=134270 Change 134270 by jb@jb_freebsd1 on 2008/01/28 01:14:12 IFdtrace Affected files ... .. //depot/projects/dtrace7/src/sys/sys/dtrace_bsd.h#2 integrate .. //depot/projects/dtrace7/src/sys/sys/sdt.h#1 branch Differences ... ==== //depot/projects/dtrace7/src/sys/sys/dtrace_bsd.h#2 (text+ko) ==== @@ -31,12 +31,60 @@ #ifndef _SYS_DTRACE_BSD_H #define _SYS_DTRACE_BSD_H +/* Forward definitions: */ +struct trapframe; +struct thread; + +/* + * Cyclic clock function type definition used to hook the cyclic + * subsystem into the appropriate timer interrupt. + */ +typedef void (*cyclic_clock_func_t)(struct trapframe *); + +/* + * These external variables are actually machine-dependent, so + * they might not actually exist. + * + * Defining them here avoids a proliferation of header files. + */ +extern cyclic_clock_func_t lapic_cyclic_clock_func[]; + +/* + * The dtrace module handles traps that occur during a DTrace probe. + * This type definition is used in the trap handler to provide a + * hook for the dtrace module to register it's handler with. + */ +typedef int (*dtrace_trap_func_t)(struct trapframe *, u_int); + +int dtrace_trap(struct trapframe *, u_int); + +extern dtrace_trap_func_t dtrace_trap_func; + /* Used by the machine dependent trap() code. */ typedef int (*dtrace_invop_func_t)(uintptr_t, uintptr_t *, uintptr_t); /* Global variable in trap.c */ extern dtrace_invop_func_t dtrace_invop_func; +/* Virtual time hook function type. */ +typedef void (*dtrace_vtime_switch_func_t)(struct thread *); + +extern int dtrace_vtime_active; +extern dtrace_vtime_switch_func_t dtrace_vtime_switch_func; + +/* The fasttrap module hooks into the fork, exit and exit. */ +typedef void (*dtrace_fork_func_t)(struct proc *, struct proc *); +typedef void (*dtrace_execexit_func_t)(struct proc *); + +/* Global variable in kern_fork.c */ +extern dtrace_fork_func_t dtrace_fasttrap_fork; + +/* Global variable in kern_exec.c */ +extern dtrace_execexit_func_t dtrace_fasttrap_exec; + +/* Global variable in kern_exit.c */ +extern dtrace_execexit_func_t dtrace_fasttrap_exit; + /* * Functions which allow the dtrace module to check that the kernel * hooks have been compiled with sufficient space for it's private @@ -45,4 +93,11 @@ size_t kdtrace_proc_size(void); size_t kdtrace_thread_size(void); +/* + * OpenSolaris compatible time functions returning nanoseconds. + * On OpenSolaris these return hrtime_t which we define as uint64_t. + */ +uint64_t dtrace_gethrtime(void); +uint64_t dtrace_gethrestime(void); + #endif /* _SYS_DTRACE_BSD_H */