Trace logging project
Nicolas.Williams at sun.com
Mon Sep 14 19:15:03 EDT 2009
On Mon, Sep 14, 2009 at 03:32:51PM -0400, Greg Hudson wrote:
> On Mon, 2009-09-14 at 13:13 -0400, Nicolas Williams wrote:
> > Also, I think you should consider a DTrace USDT provider.
> I will have to read up on this.
Ok, so, looking at the docs, it looks like it ought to be possible to
build krb5 trace macros that devolve into DTrace USDT probes when that
Defining a USDT provider and its probes is easy enough:
- you need a .d file listing provider attributes and defining the
probes and their arguments;
- DTRACE_PROBEn() <PROVIDER>_<PROBE>() and <PROVIDER>_<PROBE>_ENABLED()
macros (the last two generated by dtrace(1M) from the .d file) must
be littered in the code to define the actual probe points. The 'n'
is the number of arguments. These macros take a provider name
argument, a probe name argument, and any arguments to the probe;
- an extra build step to use dtrace(1M) to generate a header file to
include (defines the <PROVIDER>_<PROBE>*() macros) and an object to
ISTM that you could define macros with the same signatures as the ones
that DTrace would generated for you. Which means you could have a
single set of trace/probe points to litter through the code.
I think it'd be great if you did define trace points as macros that
could be generated by dtrace(1M). Someone else could do the work of
writing the .d file, autoconf and makefile code to use DTrace.
links at the bottom of that)
More information about the krbdev