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

Log:
  lockstat:::thread-spin should only fire after spinning for the lock.
  
  MFC after:    1 week

Modified:
  head/sys/kern/kern_mutex.c

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c  Wed May 18 03:19:53 2016        (r300102)
+++ head/sys/kern/kern_mutex.c  Wed May 18 03:21:21 2016        (r300103)
@@ -714,7 +714,8 @@ retry:
        LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file,
            line);
        WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line);
-       LOCKSTAT_RECORD1(thread__spin, m, spin_time);
+       if (spin_time != 0)
+               LOCKSTAT_RECORD1(thread__spin, m, spin_time);
 }
 
 struct mtx *
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to