Author: markj
Date: Mon Aug  7 17:28:35 2017
New Revision: 322173
URL: https://svnweb.freebsd.org/changeset/base/322173

Log:
  MFC r321744:
  Correct the predicates on which lockstat:::{thread,spin}-spin fire.

Modified:
  stable/11/sys/kern/kern_mutex.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_mutex.c
==============================================================================
--- stable/11/sys/kern/kern_mutex.c     Mon Aug  7 17:23:44 2017        
(r322172)
+++ stable/11/sys/kern/kern_mutex.c     Mon Aug  7 17:28:35 2017        
(r322173)
@@ -766,7 +766,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t
        LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m,
            contested, waittime, file, line);
 #ifdef KDTRACE_HOOKS
-       if (spin_time != 0)
+       if (lda.spin_cnt != 0)
                LOCKSTAT_RECORD1(spin__spin, m, spin_time);
 #endif
 }
@@ -879,7 +879,7 @@ retry:
                LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m,
                    contested, waittime, file, line);
 #ifdef KDTRACE_HOOKS
-       if (spin_time != 0)
+       if (lda.spin_cnt != 0)
                LOCKSTAT_RECORD1(thread__spin, m, spin_time);
 #endif
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to