svn commit: r213723 - stable/8/sys/sys

John Baldwin jhb at FreeBSD.org
Tue Oct 12 15:48:15 UTC 2010


Author: jhb
Date: Tue Oct 12 15:48:14 2010
New Revision: 213723
URL: http://svn.freebsd.org/changeset/base/213723

Log:
  MFC 213271:
  Account for unlocking a spin mutex in the lock profiling code in the !SMP
  case.

Modified:
  stable/8/sys/sys/mutex.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/sys/mutex.h
==============================================================================
--- stable/8/sys/sys/mutex.h	Tue Oct 12 15:26:37 2010	(r213722)
+++ stable/8/sys/sys/mutex.h	Tue Oct 12 15:48:14 2010	(r213723)
@@ -251,8 +251,11 @@ void	_thread_lock_flags(struct thread *,
 #define _rel_spin_lock(mp) do {						\
 	if (mtx_recursed((mp)))						\
 		(mp)->mtx_recurse--;					\
-	else								\
+	else {								\
+		LOCKSTAT_PROFILE_RELEASE_LOCK(LS_MTX_SPIN_UNLOCK_RELEASE, \
+			mp);						\
 		(mp)->mtx_lock = MTX_UNOWNED;				\
+	}                                                               \
 	spinlock_exit();						\
 } while (0)
 #endif /* SMP */


More information about the svn-src-stable-8 mailing list