Guard the lockstat:::thread-spin probe with KDTRACE_HOOKS.

X-MFC-With:	r300103
This commit is contained in:
markj 2016-05-18 03:23:07 +00:00
parent 39c9d57c9c
commit 706498b426

View File

@ -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 *