svn commit: r300104 - head/sys/kern

Mark Johnston markj at FreeBSD.org
Wed May 18 03:23:09 UTC 2016


Author: markj
Date: Wed May 18 03:23:07 2016
New Revision: 300104
URL: https://svnweb.freebsd.org/changeset/base/300104

Log:
  Guard the lockstat:::thread-spin probe with KDTRACE_HOOKS.
  
  X-MFC-With:	r300103

Modified:
  head/sys/kern/kern_mutex.c

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c	Wed May 18 03:21:21 2016	(r300103)
+++ head/sys/kern/kern_mutex.c	Wed May 18 03:23:07 2016	(r300104)
@@ -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 *


More information about the svn-src-head mailing list