HOWTO in wiki: adding custom dtrace probes in the kernel

Marius Nünnerich marius at nuenneri.ch
Mon Dec 1 09:34:51 PST 2008


On Fri, Nov 28, 2008 at 8:57 PM, Tim Kientzle <kientzle at freebsd.org> wrote:
>>>  SDT_PROBE(foobar, source_file1, foo, entry, a, b, 0, 0, 0);
>>>
>>> Here: why are the last three arguments zeroes?
>>
>> SDT_PROBE() is a macro with a fixed number of macros, so we have to  fill
>> with 0 in case we don't want to provide some data. Maybe there's  a way to
>> provide more arguments if you do it by hand instead of using  the
>> SDT_PROBE() macro (TODO item added in the wiki to have a look at  this, feel
>> free to improve the wiki page).
>
> Seems that SDT_PROBE() should be using C99s "variadic macro"
> feature.

Is the kernel compiled in C99 mode?


More information about the freebsd-current mailing list