summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-01-25 01:59:27 +0000
committerrwatson <rwatson@FreeBSD.org>2004-01-25 01:59:27 +0000
commitca8a19313e2f06d57456af75aaa70204aa2efede (patch)
treec3fe9c836ece7d77c67ab56d4a2e4c5c8dbb0add /sys/kern/subr_trap.c
parent983ec1a4d4e7bac61755ac3385faa3d186f57b78 (diff)
downloadFreeBSD-src-ca8a19313e2f06d57456af75aaa70204aa2efede.zip
FreeBSD-src-ca8a19313e2f06d57456af75aaa70204aa2efede.tar.gz
Add some basic support for measuring sleep mutex contention to the
mutex profiling code. As with existing mutex profiling, measurement is done with respect to mtx_lock() instances in the code, as opposed to specific mutexes. In particular, measure two things: (1) Lock contention. How often did this mtx_lock() call get made and have to sleep (or almost sleep) waiting for the lock. This helps identify the "victims" of contention. (2) Hold contention. How often, while the lock was held by a thread as a result of this mtx_lock(), did another thread try to acquire the same mutex. This helps identify the causes of contention. I'm currently exploring adding measurement of "time waited for the lock", but the current implementation has proven useful to me so far so I figured I'd commit it so others could try it out. Note that this increases the size of mutexes when MUTEX_PROFILING is enabled, so you might find you need to further bump UMA_BOOT_PAGES. Fixes welcome. The once over: des, others
Diffstat (limited to 'sys/kern/subr_trap.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud