Date: Sat, 6 Jul 2013 08:58:59 -0400 From: George Neville-Neil <gnn@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: freebsd-dtrace@freebsd.org Subject: Re: [RFC] reworking FreeBSD's SDT implementation Message-ID: <1BF6D495-5C7E-4FC3-B5A7-BB47C3D2D7F8@freebsd.org> In-Reply-To: <20130705032536.GA1570@charmander> References: <20130703041023.GA82673@raichu> <20130705032536.GA1570@charmander>
next in thread | previous in thread | raw e-mail | index | archive | help
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, >>=20 >> 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. >>=20 >> 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: >>=20 >> [...] >>=20 >> 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. >=20 > I've copied a draft SDT man page below. Any > suggestions/corrections/comments/criticisms are most welcome. >=20 > 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. Best, George
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1BF6D495-5C7E-4FC3-B5A7-BB47C3D2D7F8>