Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2008 01:15:09 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 134270 for review
Message-ID:  <200801280115.m0S1F9Ob081636@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801280115.m0S1F9Ob081636>