diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2016-10-22 18:02:20 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2016-10-22 18:02:20 +0000 |
commit | 8798ef0679c07421dd7827acf3e7e9f08d610f48 (patch) | |
tree | 5a11a48195cb2367483b3907b6f3ad695a1e59c1 /sys/kern/subr_turnstile.c | |
parent | 38d3251c3d048164804fe097b5fe9c4554bbdab4 (diff) | |
download | src-8798ef0679c07421dd7827acf3e7e9f08d610f48.tar.gz src-8798ef0679c07421dd7827acf3e7e9f08d610f48.zip |
ddb(4): Add sleepchains to "show allchains"
Reported by: markj
Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8320
Notes
Notes:
svn path=/head/; revision=307780
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r-- | sys/kern/subr_turnstile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 57d9f0975d14..dd39835d0dc2 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -157,6 +157,9 @@ static void init_turnstile0(void *dummy); #ifdef TURNSTILE_PROFILING static void init_turnstile_profiling(void *arg); #endif +#ifdef DDB +static void print_sleepchain(struct thread *td, const char *prefix); +#endif static void propagate_priority(struct thread *td); static int turnstile_adjust_thread(struct turnstile *ts, struct thread *td); @@ -1169,6 +1172,10 @@ DB_SHOW_ALL_COMMAND(chains, db_show_allchains) db_printf("chain %d:\n", i++); print_lockchain(td, " "); } + if (TD_IS_INHIBITED(td) && TD_ON_SLEEPQ(td)) { + db_printf("chain %d:\n", i++); + print_sleepchain(td, " "); + } if (db_pager_quit) return; } |