Deleted Added
full compact
kern_dtrace.c (256281) kern_dtrace.c (269752)
1/*-
2 * Copyright (c) 2007-2008 John Birrell <jb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007-2008 John Birrell <jb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/10/sys/kern/kern_dtrace.c 227293 2011-11-07 06:44:47Z ed $");
28__FBSDID("$FreeBSD: stable/10/sys/kern/kern_dtrace.c 269752 2014-08-09 14:05:01Z markj $");
29
30#include "opt_kdb.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/eventhandler.h>
35#include <sys/kdb.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/dtrace_bsd.h>
40#include <sys/sysctl.h>
29
30#include "opt_kdb.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/eventhandler.h>
35#include <sys/kdb.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/dtrace_bsd.h>
40#include <sys/sysctl.h>
41#include <sys/sysent.h>
41
42#define KDTRACE_PROC_SIZE 64
43#define KDTRACE_THREAD_SIZE 256
44
45FEATURE(kdtrace_hooks,
46 "Kernel DTrace hooks which are required to load DTrace kernel modules");
47
48static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks");
49
42
43#define KDTRACE_PROC_SIZE 64
44#define KDTRACE_THREAD_SIZE 256
45
46FEATURE(kdtrace_hooks,
47 "Kernel DTrace hooks which are required to load DTrace kernel modules");
48
49static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks");
50
51/* Hooks used in the machine-dependent trap handlers. */
52dtrace_trap_func_t dtrace_trap_func;
53dtrace_doubletrap_func_t dtrace_doubletrap_func;
54dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr;
55dtrace_return_probe_ptr_t dtrace_return_probe_ptr;
56
57systrace_probe_func_t systrace_probe_func;
58
50/* Return the DTrace process data size compiled in the kernel hooks. */
51size_t
52kdtrace_proc_size()
53{
54
55 return (KDTRACE_PROC_SIZE);
56}
57

--- 60 unchanged lines hidden ---
59/* Return the DTrace process data size compiled in the kernel hooks. */
60size_t
61kdtrace_proc_size()
62{
63
64 return (KDTRACE_PROC_SIZE);
65}
66

--- 60 unchanged lines hidden ---