Author: mjg
Date: Sat Nov 25 20:49:27 2017
New Revision: 326200
URL: https://svnweb.freebsd.org/changeset/base/326200

Log:
  Add the missing lockstat check for thread lock.

Modified:
  head/sys/kern/kern_mutex.c

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c  Sat Nov 25 20:37:13 2017        (r326199)
+++ head/sys/kern/kern_mutex.c  Sat Nov 25 20:49:27 2017        (r326200)
@@ -834,6 +834,8 @@ _thread_lock(struct thread *td)
 
        tid = (uintptr_t)curthread;
 
+       if (__predict_false(LOCKSTAT_PROFILE_ENABLED(spin__acquire)))
+               goto slowpath_noirq;
        spinlock_enter();
        m = td->td_lock;
        thread_lock_validate(m, 0, file, line);
@@ -855,7 +857,12 @@ _thread_lock(struct thread *td)
                _mtx_release_lock_quick(m);
 slowpath_unlocked:
        spinlock_exit();
+slowpath_noirq:
+#if LOCK_DEBUG > 0
+       thread_lock_flags_(td, opts, file, line);
+#else
        thread_lock_flags_(td, 0, 0, 0);
+#endif
 }
 #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