summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_turnstile.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-04-12 17:43:59 +0000
committerjhb <jhb@FreeBSD.org>2012-04-12 17:43:59 +0000
commit20ac4e4f812f8a1caca5d5d792b599580c95d8e4 (patch)
tree26b9e2e550fbe63d131bb05f09fe4a80cd0e9c8c /sys/kern/subr_turnstile.c
parent8840b80b150a66caf96c13d04b34664655ca1b7c (diff)
downloadFreeBSD-src-20ac4e4f812f8a1caca5d5d792b599580c95d8e4.zip
FreeBSD-src-20ac4e4f812f8a1caca5d5d792b599580c95d8e4.tar.gz
- Extend the KDB interface to add a per-debugger callback to print a
backtrace for an arbitrary thread (rather than the calling thread). A kdb_backtrace_thread() wrapper function uses the configured debugger if possible, otherwise it falls back to using stack(9) if that is available. - Replace a direct call to db_trace_thread() in propagate_priority() with a call to kdb_backtrace_thread() instead. MFC after: 1 week
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r--sys/kern/subr_turnstile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index 008dada..3ac03b0 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -217,9 +217,7 @@ propagate_priority(struct thread *td)
printf(
"Sleeping thread (tid %d, pid %d) owns a non-sleepable lock\n",
td->td_tid, td->td_proc->p_pid);
-#ifdef DDB
- db_trace_thread(td, -1);
-#endif
+ kdb_backtrace_thread(td);
panic("sleeping thread");
}
OpenPOWER on IntegriCloud