From 12e9993f656c12c42c0666a985afeb7ce4424e80 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Tue, 23 Mar 2004 00:32:27 +0000 Subject: [PATCH] Emit a traceback when witness_trace is set and witness_warn() is called and triggers (typically caused by sleeping with a non-sleepable lock). Reviewed by: jhb --- sys/kern/subr_witness.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 95d7a83c0a1..3b05fff4c83 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -1150,6 +1150,8 @@ witness_warn(int flags, struct lock_object *lock, const char *fmt, ...) #ifdef DDB else if (witness_ddb && n) Debugger(__func__); + else if (witness_trace && n) + backtrace(); #endif return (n); }