summaryrefslogtreecommitdiffstats
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2006-11-11 03:18:07 +0000
committerkmacy <kmacy@FreeBSD.org>2006-11-11 03:18:07 +0000
commit9eefcf316159b161b2c6e5143a8991bcb7e63711 (patch)
treef43d5c4ecffd369fdc72c9807d30ffd296fd76f6 /sys/sys/lock.h
parentcd277df0bb233f1107603284c3a160846855b3a1 (diff)
downloadFreeBSD-src-9eefcf316159b161b2c6e5143a8991bcb7e63711.zip
FreeBSD-src-9eefcf316159b161b2c6e5143a8991bcb7e63711.tar.gz
MUTEX_PROFILING has been generalized to LOCK_PROFILING. We now profile
wait (time waited to acquire) and hold times for *all* kernel locks. If the architecture has a system synchronized TSC, the profiling code will use that - thereby minimizing profiling overhead. Large chunks of profiling code have been moved out of line, the overhead measured on the T1 for when it is compiled in but not enabled is < 1%. Approved by: scottl (standing in for mentor rwatson) Reviewed by: des and jhb
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index b10b54a..9ca9376 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -69,6 +69,7 @@ struct lock_class {
#define LO_DUPOK 0x00400000 /* Don't check for duplicate acquires */
#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 */
/*
* Lock classes are statically assigned an index into the gobal lock_classes
@@ -142,7 +143,7 @@ struct lock_list_entry {
* calling conventions for this debugging code in modules so that modules can
* work with both debug and non-debug kernels.
*/
-#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(KTR) || defined(MUTEX_PROFILING)
+#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(KTR) || defined(LOCK_PROFILING)
#define LOCK_DEBUG 1
#else
#define LOCK_DEBUG 0
OpenPOWER on IntegriCloud