diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 187d96bf42ac..d9e5872e2a4f 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -714,8 +714,10 @@ thread_lock_flags_(struct thread *td, int opts, const char *file, int line) LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); +#ifdef KDTRACE_HOOKS if (spin_time != 0) LOCKSTAT_RECORD1(thread__spin, m, spin_time); +#endif } struct mtx *