summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2016-05-18 03:23:07 +0000
committermarkj <markj@FreeBSD.org>2016-05-18 03:23:07 +0000
commit706498b4268e18024844553c7a70e58e1cf9da63 (patch)
treed07c7dd364d91b0e858e5af15aedbf10c83865be /sys/kern
parent39c9d57c9c9787223ee9f7d5f5833461b1ac970d (diff)
downloadFreeBSD-src-706498b4268e18024844553c7a70e58e1cf9da63.zip
FreeBSD-src-706498b4268e18024844553c7a70e58e1cf9da63.tar.gz
Guard the lockstat:::thread-spin probe with KDTRACE_HOOKS.
X-MFC-With: r300103
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_mutex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 187d96b..d9e5872 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -714,8 +714,10 @@ retry:
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 *
OpenPOWER on IntegriCloud