cvs commit: src/sys/kern subr_sleepqueue.c
jeff at FreeBSD.org
Wed Mar 19 00:22:08 PDT 2008
jeff 2008-03-19 07:22:07 UTC
FreeBSD src repository
- Add a facility similar to LOCK_PROFILING under SLEEPQUEUE_PROFILING. Keep
a simple (wmesg, count) tuple in a hash to keep track of how many times
we sleep at each wait message. We hash on message and not channel. No
line number information is given as typically wait messages are not used in
more than one place. Identical strings defined at different addresses will
show up with seperate counters.
- Use debug.sleepq.enable to enable, .reset to reset, and .stats dumps stats.
- Do an unsynchronized check in sleepq_switch() prior to switching before
calling sleepq_profile() which uses a global lock to synchronize the hash.
Only sleeps which actually cause a context switch are counted.
Revision Changes Path
1.49 +159 -1 src/sys/kern/subr_sleepqueue.c
More information about the cvs-src