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 <sys/sysent.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 ("$FreeBSD$")
 
 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 ()
 
void kdtrace_proc_ctor (struct proc *p)
 
void kdtrace_proc_dtor (struct proc *p)
 
size_t kdtrace_thread_size ()
 
void kdtrace_thread_ctor (struct thread *td)
 
void kdtrace_thread_dtor (struct thread *td)
 

Variables

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
 
bool __read_frequently systrace_enabled
 
systrace_probe_func_t systrace_probe_func
 

Macro Definition Documentation

◆ KDTRACE_PROC_SIZE

#define KDTRACE_PROC_SIZE   64

Definition at line 45 of file kern_dtrace.c.

◆ KDTRACE_THREAD_SIZE

#define KDTRACE_THREAD_SIZE   256

Definition at line 46 of file kern_dtrace.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ FEATURE()

FEATURE ( kdtrace_hooks  ,
"Kernel DTrace hooks which are required to load DTrace kernel modules"   
)

◆ kdtrace_proc_ctor()

void kdtrace_proc_ctor ( struct proc *  p)

Definition at line 71 of file kern_dtrace.c.

References KDTRACE_PROC_SIZE, and malloc().

Referenced by proc0_init(), and proc_ctor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdtrace_proc_dtor()

void kdtrace_proc_dtor ( struct proc *  p)

Definition at line 78 of file kern_dtrace.c.

References free().

Referenced by proc_dtor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdtrace_proc_size()

size_t kdtrace_proc_size ( )

Definition at line 64 of file kern_dtrace.c.

References KDTRACE_PROC_SIZE.

◆ kdtrace_thread_ctor()

void kdtrace_thread_ctor ( struct thread *  td)

Definition at line 94 of file kern_dtrace.c.

References KDTRACE_THREAD_SIZE, and malloc().

Referenced by proc0_init(), and thread_ctor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdtrace_thread_dtor()

void kdtrace_thread_dtor ( struct thread *  td)

Definition at line 101 of file kern_dtrace.c.

References free().

Referenced by thread_dtor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdtrace_thread_size()

size_t kdtrace_thread_size ( )

Definition at line 87 of file kern_dtrace.c.

References KDTRACE_THREAD_SIZE.

◆ MALLOC_DEFINE()

static MALLOC_DEFINE ( M_KDTRACE  ,
"kdtrace"  ,
"DTrace hooks"   
)
static

Variable Documentation

◆ dtrace_doubletrap_func

dtrace_doubletrap_func_t dtrace_doubletrap_func

Definition at line 55 of file kern_dtrace.c.

◆ dtrace_pid_probe_ptr

dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr

Definition at line 56 of file kern_dtrace.c.

◆ dtrace_return_probe_ptr

dtrace_return_probe_ptr_t dtrace_return_probe_ptr

Definition at line 57 of file kern_dtrace.c.

◆ dtrace_trap_func

dtrace_trap_func_t dtrace_trap_func

Definition at line 54 of file kern_dtrace.c.

◆ systrace_enabled

bool __read_frequently systrace_enabled

Definition at line 59 of file kern_dtrace.c.

◆ systrace_probe_func

systrace_probe_func_t systrace_probe_func

Definition at line 60 of file kern_dtrace.c.