Thomas Maier-Komor
2010-07-16 14:39:21 UTC
Hi,
is it somehow possible to conditionally enable a section of code that is responsible for constructing a probe argument.
I.e. if the first probe argument is a string, can I attach a function to the probe that will yield that string so that it doesn't have to be constructed if the probe doesn't fire?
Defining the following probe yields assembly that executes the call to expensive_argument_construction unconditionally...
DTRACE_PROBE1(myprovider,myprobe,expensive_argument_construction());
- Thomas
is it somehow possible to conditionally enable a section of code that is responsible for constructing a probe argument.
I.e. if the first probe argument is a string, can I attach a function to the probe that will yield that string so that it doesn't have to be constructed if the probe doesn't fire?
Defining the following probe yields assembly that executes the call to expensive_argument_construction unconditionally...
DTRACE_PROBE1(myprovider,myprobe,expensive_argument_construction());
- Thomas
--
This message posted from opensolaris.org
This message posted from opensolaris.org