On Wed, Nov 12, 2008 at 08:42:00AM +0530, S h i v wrote: > I would like to make some execution time decisions as to which > libraries to trace and which ones not to. > > For ex: > 1. I use hotuser script and identify a bunch of functions/libraries > taking the most time under load. > 2. Now I would like to apply hotuser kind of profiling only to those > libraries and heavier load(which might not be possible otherwise). > > In such cases, I probably need to have parameterised predicate list or > dynamically generated dscripts. > One thought that occurs to me is to have some kind of pre-processing > option available in dtrace. Write a wrapper shell/perl script that > helps identify decision points for the pre-processor and conditionally > execute different instructions. > Probably pre-processing is already present. I wasn't able to find it > in some of the documentation I looked at on the net.
If you add '-C' to the dtrace arguments, it will run the C preprocessor. You can then use -DVAR=value to pass in whatever you need. Cheers, - jonathan _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org