DTrace for FreeBSD - fbt output

Kris Kennaway kris at obsecurity.org
Wed Jun 14 15:38:50 UTC 2006


On Wed, Jun 14, 2006 at 10:21:44AM -0400, John Baldwin wrote:
> On Wednesday 14 June 2006 05:54, John Birrell wrote:
> > > > critical_enter                                           4364385478
> > > > critical_exit                                            4364385478
> > 
> > The points I wanted to make about these calls are:
> > 
> > 1. critical_enter is called so often that the debug printf that /could/
> >    be compiled into it should cause an increase in global warming if
> >    you tried. 8-)
> 
> No, it's not a printf to the console it's a printf into the a circular
> buffer (see options KTR) and the system has been run with it enabled w/o
> burning the machine up. :)

For point of comparison, I added an implementation of spinlock
profiling in my kris-contention p4 branch which does a KTR every 100
mtx_lock_spin() operations, and this has less than 5% performance
impact.  KTR is very cheap since it is just a single atomic op to
increment the buffer index, and then a couple of pointer assignments.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20060614/8592615b/attachment-0001.pgp


More information about the freebsd-current mailing list