summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_yield.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-19 07:22:07 +0000
committerjeff <jeff@FreeBSD.org>2008-03-19 07:22:07 +0000
commitea2b75bd30555912031e1c807fe6070bdaff5058 (patch)
treed90f7802d991eda14b421adf3a1efdd4fe91e48a /lib/libthr/thread/thr_yield.c
parent4cd4553bb53da6eff2e16385db01ba95bd7d7266 (diff)
downloadFreeBSD-src-ea2b75bd30555912031e1c807fe6070bdaff5058.zip
FreeBSD-src-ea2b75bd30555912031e1c807fe6070bdaff5058.tar.gz
- 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.
Diffstat (limited to 'lib/libthr/thread/thr_yield.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud