Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2013 10:23:06 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        George Neville-Neil <gnn@freebsd.org>
Cc:        freebsd-dtrace@freebsd.org
Subject:   Re: [RFC] reworking FreeBSD's SDT implementation
Message-ID:  <20130706142306.GC4559@raichu>
In-Reply-To: <1BF6D495-5C7E-4FC3-B5A7-BB47C3D2D7F8@freebsd.org>
References:  <20130703041023.GA82673@raichu> <20130705032536.GA1570@charmander> <1BF6D495-5C7E-4FC3-B5A7-BB47C3D2D7F8@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 06, 2013 at 08:58:59AM -0400, George Neville-Neil wrote:
> 
> On Jul 4, 2013, at 23:25 , Mark Johnston <markj@freebsd.org> wrote:
> 
> > On Wed, Jul 03, 2013 at 12:10:23AM -0400, Mark Johnston wrote:
> >> Hello,
> >> 
> >> There are a few problems with the way SDT is currently implemented in
> >> FreeBSD. First, the DTrace framework isn't notified when modules are
> >> unloaded, so any probes created by these modules are never destroyed
> >> (this problem isn't specific to SDT though, FBT probes have the same
> >> problem). Second, there is currently nothing preventing one from
> >> unloading a module while some of its SDT probes are enabled; doing this
> >> will generally cause a panic. Finally, providers are "tied" to modules
> >> in the sense that dtrace_unregister() is called on each provider
> >> declared in a module when that module is unloaded. This is inflexible -
> >> probes already have a "module" field to indicate which module they're
> >> defined in, and it would restrict the implementation of, say, a
> >> hypothetical GEOM or netgraph provider, which would probably contain
> >> some common probes for each GEOM or netgraph module. Plus a panic will
> >> occur if a probe from one module is enabled and a second module
> >> declaring the provider of the probe is unloaded.
> >> 
> >> I have a patch at [1] which tries to solve all of these problems. It
> >> more or less completely reworks FreeBSD's SDT implementation (currently
> >> contained in kern/kern_sdt.c and cddl/dev/sdt/sdt.c) and changes a
> >> number of things:
> >> 
> >> [...]
> >> 
> >> I'm also writing a man page for the SDT macros so that there's some
> >> guidance on how to create SDT probes and providers.
> > 
> > I've copied a draft SDT man page below. Any
> > suggestions/corrections/comments/criticisms are most welcome.
> > 
> > I would also like to have man pages for individual providers, but this
> > is a start. :)
> 
> Hello Mark,
> 
> Sorry to take to long to reply.  I think your approach to SDTs is sound and we should
> move forward with that, in particular as you say it brings us closer to the implementation
> ideas in Solaris.  I will try to test your patch on HEAD today and let you know if I have
> any problems with it.  In the meantime feel free to test and commit it on your own,
> don't wait for me.  The man page also looks good.

Thanks! I've added an updated patch here:

http://people.freebsd.org/~markj/patches/20130706-sdt-module-info.diff

There aren't any functional differences, just diff reduction and the man
page.

Thanks,
-Mark



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