Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2008 04:41:38 +0000
From:      John Birrell <jb@what-creek.com>
To:        Roman Divacky <rdivacky@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_sdt.c
Message-ID:  <20080521044138.GB62522@what-creek.com>
In-Reply-To: <20080519202445.GA82705@freebsd.org>
References:  <200805181932.m4IJWagN055358@repoman.freebsd.org> <20080519202445.GA82705@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 19, 2008 at 10:24:45PM +0200, Roman Divacky wrote:
> On Sun, May 18, 2008 at 07:32:36PM +0000, John Birrell wrote:
> > jb          2008-05-18 19:32:36 UTC
> > 
> >   FreeBSD src repository
> > 
> >   Added files:
> >     sys/kern             kern_sdt.c 
> >   Log:
> >   Add kernel support for the Statically Defined Trace provider.
> >   
> >   This is BSD licensed code written specifically for FreeBSD.
> >   
> >   It initialises using SYSINIT so that the SDT provider, probe and
> >   argument description linkage is done whenever a module is loaded,
> >   regardless of whether the DTrace modules are loaded or not.
> >   
> >   This file is optionally compiled into the kernel if the KDTRACE_HOOKS
> >   option is defined.
> 
> great to see this coming!
> 
> in the sdt_*_listall() functions you lock the sx lock exclusively while
> traversing the list... why? I think shared locking is enough in those
> cases....

There are other locks held which make shared locking of no value. The
locking strategy in the dtrace module is set by the design of the Solaris
code. This doesn't mean we can't change it, but we would need to
gain something to make it worthwhile.  It's not as though this stuff is
being called all that often.

--
John Birrell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080521044138.GB62522>