svn commit: r187156 - head/tools/sched
John Baldwin
jhb at freebsd.org
Thu Jan 15 14:47:08 PST 2009
On Tuesday 13 January 2009 11:44:18 am John Baldwin wrote:
> Author: jhb
> Date: Tue Jan 13 16:44:18 2009
> New Revision: 187156
> URL: http://svn.freebsd.org/changeset/base/187156
>
> Log:
> Add support for two new event source types:
> - Callwheels traced via KTR_CALLOUT. Each CPU is assigned a callwheel
> source. The events on this source are the execution of individual callout
> routines. Each routine shows up as a green rectangle while it is executed
> and the event details include the function pointer and argument.
> - Locks traced via KTR_LOCK. Currently, each lock name is assigned an event
> source (since the existing KTR_LOCK traces only include lock names and
> not pointers). This does mean that if multiple locks of the same name are
> manipulated, the source line for that name may be confusing. However, for
> many cases this can be useful. Locks are blue when they are held and
> purple when contested. The contention support is a bit weak due to
> limitations in the rw_rlock() and mtx_lock_spin() logging messages
> currently. I also have not added support for contention on lockmgr,
> sx, or rmlocks yet. What is there now can be profitably used to examine
> activity on Giant however.
> - Expand the width of the event source names column a bit to allow for some
> of the longer names of these new source types.
For some examples, check out www.freebsd.org/~jhb/sysctl_before.png and
sysctl_after.png. Those are screenshots of 'sysctl -a' showing lock activity.
In particular, in 'after' I removed (via #if 0) the debug.hashstat sysctls
(from sys/kern/vfs_cache.c). In the 'before' graph one of those two sysctls
(the raw dump of the hash table depths) took 7 milliseconds to run on my test
machine (2 x 3.4 GHz Intel dual-core) holding Giant the entire time which caused
softclock to block on Giant for a couple of milliseconds. (These traces were
performed on 7-stable.)
Once I get more caught up I plan on sticking those sysctl's under some sort of
#ifdef that isn't on by default.
--
John Baldwin
More information about the svn-src-all
mailing list