Re: DTrace for FreeBSD - fbt output

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Wed, 14 Jun 2006 11:38:47 -0400
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

Received on Wed Jun 14 2006 - 13:38:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:57 UTC