FreeBSD kernel kern code
kern_dtrace.c File Reference
#include <sys/cdefs.h>
#include "opt_kdb.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/dtrace_bsd.h>
#include <sys/sysctl.h>
Include dependency graph for kern_dtrace.c:

Go to the source code of this file.

Macros

#define KDTRACE_PROC_SIZE   64
 
#define KDTRACE_THREAD_SIZE   256
 

Functions

 __FBSDID ("$BSDSUniX$")
 
 FEATURE (kdtrace_hooks,"Kernel DTrace hooks which are required to load DTrace kernel modules")
 
static MALLOC_DEFINE (M_KDTRACE,"kdtrace","DTrace hooks")
 
size_t kdtrace_proc_size ()
 
static void kdtrace_proc_ctor (void *arg __unused, struct proc *p)
 
static void kdtrace_proc_dtor (void *arg __unused, struct proc *p)
 
size_t kdtrace_thread_size ()
 
static void kdtrace_thread_ctor (void *arg __unused, struct thread *td)
 
static void kdtrace_thread_dtor (void *arg __unused, struct thread *td)
 
static void init_dtrace (void *dummy __unused)
 
 SYSINIT (kdtrace, SI_SUB_KDTRACE, SI_ORDER_FIRST, init_dtrace, NULL)
 

Macro Definition Documentation

#define KDTRACE_PROC_SIZE   64

Definition at line 42 of file kern_dtrace.c.

Referenced by kdtrace_proc_ctor(), and kdtrace_proc_size().

#define KDTRACE_THREAD_SIZE   256

Definition at line 43 of file kern_dtrace.c.

Referenced by kdtrace_thread_ctor(), and kdtrace_thread_size().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
FEATURE ( kdtrace_hooks  ,
"Kernel DTrace hooks which are required to load DTrace kernel modules"   
)
static void init_dtrace ( void *dummy  __unused)
static

Definition at line 104 of file kern_dtrace.c.

References kdtrace_proc_ctor(), kdtrace_proc_dtor(), kdtrace_thread_ctor(), kdtrace_thread_dtor(), thread_ctor(), and thread_dtor().

Here is the call graph for this function:

static void kdtrace_proc_ctor ( void *arg  __unused,
struct proc *  p 
)
static

Definition at line 59 of file kern_dtrace.c.

References KDTRACE_PROC_SIZE, and malloc().

Referenced by init_dtrace().

Here is the call graph for this function:

Here is the caller graph for this function:

static void kdtrace_proc_dtor ( void *arg  __unused,
struct proc *  p 
)
static

Definition at line 66 of file kern_dtrace.c.

References free().

Referenced by init_dtrace().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t kdtrace_proc_size ( )

Definition at line 52 of file kern_dtrace.c.

References KDTRACE_PROC_SIZE.

static void kdtrace_thread_ctor ( void *arg  __unused,
struct thread *  td 
)
static

Definition at line 84 of file kern_dtrace.c.

References KDTRACE_THREAD_SIZE, and malloc().

Referenced by init_dtrace().

Here is the call graph for this function:

Here is the caller graph for this function:

static void kdtrace_thread_dtor ( void *arg  __unused,
struct thread *  td 
)
static

Definition at line 91 of file kern_dtrace.c.

References free().

Referenced by init_dtrace().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t kdtrace_thread_size ( )

Definition at line 77 of file kern_dtrace.c.

References KDTRACE_THREAD_SIZE.

static MALLOC_DEFINE ( M_KDTRACE  ,
"kdtrace"  ,
"DTrace hooks"   
)
static
SYSINIT ( kdtrace  ,
SI_SUB_KDTRACE  ,
SI_ORDER_FIRST  ,
init_dtrace  ,
NULL   
)