aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2007-02-27 06:42:05 +0000
committerKip Macy <kmacy@FreeBSD.org>2007-02-27 06:42:05 +0000
commitf183910b97a54940f78db43341b3954ba8a2e32d (patch)
treec7228dd81a9d5cf5855323c889da39c667a4dd5a /sys/sys/lock.h
parentfc5fe41fe974ad8eb03abb7a1afa6202e678ad7a (diff)
downloadsrc-f183910b97a54940f78db43341b3954ba8a2e32d.tar.gz
src-f183910b97a54940f78db43341b3954ba8a2e32d.zip
Further improvements to LOCK_PROFILING:
- Fix missing initialization in kern_rwlock.c causing bogus times to be collected - Move updates to the lock hash to after the lock is released for spin mutexes, sleep mutexes, and sx locks - Add new kernel build option LOCK_PROFILE_FAST - only update lock profiling statistics when an acquisition is contended. This reduces the overhead of LOCK_PROFILING to increasing system time by 20%-25% which on "make -j8 kernel-toolchain" on a dual woodcrest is unmeasurable in terms of wall-clock time. Contrast this to enabling lock profiling without LOCK_PROFILE_FAST and I see a 5x-6x slowdown in wall-clock time.
Notes
Notes: svn path=/head/; revision=167054
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 1b80bc8ec36f..a30a595f03c6 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -70,6 +70,7 @@ struct lock_class {
#define LO_ENROLLPEND 0x00800000 /* On the pending enroll list. */
#define LO_CLASSMASK 0x0f000000 /* Class index bitmask. */
#define LO_NOPROFILE 0x10000000 /* Don't profile this lock */
+#define LO_CONTESTED 0x20000000 /* Lock was contested */
/*
* Lock classes are statically assigned an index into the gobal lock_classes