[dtrace-discuss] Specify module and function for USDT

Michael Shapiro mws at zion.eng.sun.com
Tue Aug 8 08:50:46 PDT 2006


> Hi Trond,
> 
> It's not an unreasonable RFE, but we do reserve the right to decide that
> it's the wrong direction. There's no technical reason we couldn't allow
> you to choose an arbitrary name for a probe, but we'll need to think about
> how that fits into the current DTrace model in terms of consistency.
> 
> Adam
> 
> On Tue, Aug 08, 2006 at 07:23:26AM -0700, Trond Norbye wrote:
> > Hi
> > 
> > I would like to hear if this would be a reasonable RFE, or if I am the only one that would like to be able to specify the module and the function for my probes. 
> > 
> > The typical "end-user" of my probes would probably be more comfortable with a set of "logical" functions, than the name-mangled C++ name ;-) (and I would then be able to create a more logical view to the end-user if I fire a "pair" of probes from two different functions).
> > 
> > So what do you think??
> > 
> > Trond

More generally, higher-level languages like C++ still have the same concepts
(provider, module, function, name).  The issue is really that we want to give
people a way to avoid dealing with mangling, and specify "function" in a way
that is meaningful in that language.  For example, in C++ or Objective C
function should be specified as to indicate the class and method name
and even the method signature in the case of specialization.  The direction
I'd like us to take here is to define a model for this and an escape sequence
that would permit a fragment of the probe description to be specified in a
format appropriate for the native language, and then some plug-in to DTrace
which permits it to appropriately parse/mangle that into something that the
pid provider can enable.  We also would want to support iteration (dtrace -l).

-Mike

-- 
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/


More information about the dtrace-discuss mailing list