Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_turnstile.c
Show First 20 Lines • Show All 1,206 Lines • ▼ Show 20 Lines | else | ||||
td = kdb_thread; | td = kdb_thread; | ||||
print_lockchain(td, ""); | print_lockchain(td, ""); | ||||
} | } | ||||
DB_SHOW_ALIAS(sleepchain, db_show_lockchain); | DB_SHOW_ALIAS(sleepchain, db_show_lockchain); | ||||
DB_SHOW_ALL_COMMAND(chains, db_show_allchains) | DB_SHOW_ALL_COMMAND(chains, db_show_allchains) | ||||
{ | { | ||||
VPS_ITERATOR_DECL(vps_iter); | |||||
struct thread *td; | struct thread *td; | ||||
struct proc *p; | struct proc *p; | ||||
int i; | int i; | ||||
i = 1; | i = 1; | ||||
/* VPS_LIST_RLOCK(); */ | |||||
VPS_FOREACH(vps_iter) { | |||||
CURVPS_SET(vps_iter); | |||||
FOREACH_PROC_IN_SYSTEM(p) { | FOREACH_PROC_IN_SYSTEM(p) { | ||||
FOREACH_THREAD_IN_PROC(p, td) { | FOREACH_THREAD_IN_PROC(p, td) { | ||||
if ((TD_ON_LOCK(td) && LIST_EMPTY(&td->td_contested)) | if ((TD_ON_LOCK(td) && | ||||
|| (TD_IS_INHIBITED(td) && TD_ON_SLEEPQ(td))) { | LIST_EMPTY(&td->td_contested)) | ||||
|| (TD_IS_INHIBITED(td) && | |||||
TD_ON_SLEEPQ(td))) { | |||||
db_printf("chain %d:\n", i++); | db_printf("chain %d:\n", i++); | ||||
print_lockchain(td, " "); | print_lockchain(td, " "); | ||||
} | } | ||||
if (db_pager_quit) | if (db_pager_quit) | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
CURVPS_RESTORE(); | |||||
} | |||||
/* VPS_LIST_RUNLOCK(); */ | |||||
} | } | ||||
DB_SHOW_ALIAS(allchains, db_show_allchains) | DB_SHOW_ALIAS(allchains, db_show_allchains) | ||||
static void print_waiters(struct turnstile *ts, int indent); | static void print_waiters(struct turnstile *ts, int indent); | ||||
static void | static void | ||||
print_waiter(struct thread *td, int indent) | print_waiter(struct thread *td, int indent) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |