Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/lockstat.h
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | |||||
* The following must match the type definition of dtrace_probe. It is | * The following must match the type definition of dtrace_probe. It is | ||||
* defined this way to avoid having to rely on CDDL code. | * defined this way to avoid having to rely on CDDL code. | ||||
*/ | */ | ||||
extern uint32_t lockstat_probemap[LS_NPROBES]; | extern uint32_t lockstat_probemap[LS_NPROBES]; | ||||
typedef void (*lockstat_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1, | typedef void (*lockstat_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1, | ||||
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4); | uintptr_t arg2, uintptr_t arg3, uintptr_t arg4); | ||||
extern lockstat_probe_func_t lockstat_probe_func; | extern lockstat_probe_func_t lockstat_probe_func; | ||||
extern uint64_t lockstat_nsecs(void); | extern uint64_t lockstat_nsecs(void); | ||||
extern int lockstat_enabled; | |||||
#ifdef KDTRACE_HOOKS | #ifdef KDTRACE_HOOKS | ||||
/* | /* | ||||
* Macros to record lockstat probes. | * Macros to record lockstat probes. | ||||
*/ | */ | ||||
#define LOCKSTAT_RECORD4(probe, lp, arg1, arg2, arg3, arg4) do { \ | #define LOCKSTAT_RECORD4(probe, lp, arg1, arg2, arg3, arg4) do { \ | ||||
uint32_t id; \ | uint32_t id; \ | ||||
\ | \ | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |