Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_witness.c
Show First 20 Lines • Show All 474 Lines • ▼ Show 20 Lines | |||||
/* The lock order data hash */ | /* The lock order data hash */ | ||||
static struct witness_lock_order_data w_lodata[WITNESS_LO_DATA_COUNT]; | static struct witness_lock_order_data w_lodata[WITNESS_LO_DATA_COUNT]; | ||||
static struct witness_lock_order_data *w_lofree = NULL; | static struct witness_lock_order_data *w_lofree = NULL; | ||||
static struct witness_lock_order_hash w_lohash; | static struct witness_lock_order_hash w_lohash; | ||||
static int w_max_used_index = 0; | static int w_max_used_index = 0; | ||||
static unsigned int w_generation = 0; | static unsigned int w_generation = 0; | ||||
static const char w_notrunning[] = "Witness not running\n"; | static const char w_notrunning[] = "Witness not running\n"; | ||||
static const char w_stillcold[] = "Witness is still cold\n"; | static const char w_stillcold[] = "Witness is still cold\n"; | ||||
#ifdef __i386__ | |||||
static const char w_notallowed[] = "The sysctl is disabled on the arch\n"; | |||||
#endif | |||||
static struct witness_order_list_entry order_lists[] = { | static struct witness_order_list_entry order_lists[] = { | ||||
/* | /* | ||||
* sx locks | * sx locks | ||||
*/ | */ | ||||
{ "proctree", &lock_class_sx }, | { "proctree", &lock_class_sx }, | ||||
{ "allproc", &lock_class_sx }, | { "allproc", &lock_class_sx }, | ||||
{ "allprison", &lock_class_sx }, | { "allprison", &lock_class_sx }, | ||||
{ NULL, NULL }, | { NULL, NULL }, | ||||
▲ Show 20 Lines • Show All 2,280 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
sysctl_debug_witness_fullgraph(SYSCTL_HANDLER_ARGS) | sysctl_debug_witness_fullgraph(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
struct witness *w; | struct witness *w; | ||||
struct sbuf *sb; | struct sbuf *sb; | ||||
int error; | int error; | ||||
#ifdef __i386__ | |||||
error = SYSCTL_OUT(req, w_notallowed, sizeof(w_notallowed)); | |||||
return (error); | |||||
#endif | |||||
if (witness_watch < 1) { | if (witness_watch < 1) { | ||||
error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); | error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning)); | ||||
return (error); | return (error); | ||||
} | } | ||||
if (witness_cold) { | if (witness_cold) { | ||||
error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); | error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold)); | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |