diff options
author | markj <markj@FreeBSD.org> | 2014-05-29 01:42:22 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-05-29 01:42:22 +0000 |
commit | 4c818572b74bcb24fb133ba67b4362374115dd0c (patch) | |
tree | fd6ff97f4b9a6f38b178cb26ca50f9fc6bcdcaeb | |
parent | 12b89b902d67d1d44fdb4f245878755482951413 (diff) | |
download | FreeBSD-src-4c818572b74bcb24fb133ba67b4362374115dd0c.zip FreeBSD-src-4c818572b74bcb24fb133ba67b4362374115dd0c.tar.gz |
Commit the rest of the changes that were intended to be part of r266826.
X-MFC-with: r266826
-rw-r--r-- | sys/amd64/amd64/trap.c | 22 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 22 | ||||
-rw-r--r-- | sys/kern/kern_dtrace.c | 9 | ||||
-rw-r--r-- | sys/mips/mips/trap.c | 22 | ||||
-rw-r--r-- | sys/powerpc/aim/trap.c | 21 |
5 files changed, 9 insertions, 87 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 9f3ac4f..ce0ab6a 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -95,28 +95,6 @@ PMC_SOFT_DEFINE( , , page_fault, write); #ifdef KDTRACE_HOOKS #include <sys/dtrace_bsd.h> - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif extern void trap(struct trapframe *frame); diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index be76575..97254f2 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -104,28 +104,6 @@ PMC_SOFT_DEFINE( , , page_fault, write); #ifdef KDTRACE_HOOKS #include <sys/dtrace_bsd.h> - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif extern void trap(struct trapframe *frame); diff --git a/sys/kern/kern_dtrace.c b/sys/kern/kern_dtrace.c index 5582fb9..f5f14b7 100644 --- a/sys/kern/kern_dtrace.c +++ b/sys/kern/kern_dtrace.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/dtrace_bsd.h> #include <sys/sysctl.h> +#include <sys/sysent.h> #define KDTRACE_PROC_SIZE 64 #define KDTRACE_THREAD_SIZE 256 @@ -47,6 +48,14 @@ FEATURE(kdtrace_hooks, static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); +/* Hooks used in the machine-dependent trap handlers. */ +dtrace_trap_func_t dtrace_trap_func; +dtrace_doubletrap_func_t dtrace_doubletrap_func; +dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; +dtrace_return_probe_ptr_t dtrace_return_probe_ptr; + +systrace_probe_func_t systrace_probe_func; + /* Return the DTrace process data size compiled in the kernel hooks. */ size_t kdtrace_proc_size() diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index 8095530..f0df09c 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -93,28 +93,6 @@ __FBSDID("$FreeBSD$"); #ifdef KDTRACE_HOOKS #include <sys/dtrace_bsd.h> - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif #ifdef TRAP_DEBUG diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index 33e8cf5..a3380e3 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -95,27 +95,6 @@ struct powerpc_exception { #ifdef KDTRACE_HOOKS #include <sys/dtrace_bsd.h> -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; int (*dtrace_invop_jump_addr)(struct trapframe *); #endif |