Guard the lockstat:::thread-spin probe with KDTRACE_HOOKS.
X-MFC-With: r300103
This commit is contained in:
parent
156fbc14a0
commit
5002e19502
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300104
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user