Amit Saha
2009-Mar-11 06:36 UTC
[dtrace-discuss] Auto-Generating and custom header files for probes
Hi all, I am trying to understand how to: 1. Auto generate the probe header from a probes.d file: Isn?t it as simple as ?dtrace -h simple_probes.d'', where ?imple_probes.d: <code> provider simple { probe saw__word(int); probe saw__line(int); }; </code> however, when i do the above, I get: ''dtrace: -h requires one or more scripts or enabling options? (I am following: http://blogs.sun.com/barts/entry/putting_user_defined_dtrace_probe) 2. How to generate custom probe header macros and how does it work? This page here: http://www.solarisinternals.com/wiki/index.php/DTrace_Topics_USDT#USDT_Macros hints at it, but is rather incomplete. Thank You! Regards, Amit -- http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in "Recursion is the basic iteration mechanism in Scheme" --- http://c2.com/cgi/wiki?TailRecursion
Adam Leventhal
2009-Mar-11 06:45 UTC
[dtrace-discuss] Auto-Generating and custom header files for probes
You''re missing a ''-s'' option. I think this might be a better reference: http://blogs.sun.com/ahl/entry/user_land_tracing_gets_better Adam On Mar 10, 2009, at 11:36 PM, Amit Saha wrote:> Hi all, > > I am trying to understand how to: > > 1. Auto generate the probe header from a probes.d file: Isn?t it as > simple as ?dtrace -h simple_probes.d'', where ?imple_probes.d: > > <code> > > provider simple { > probe saw__word(int); > probe saw__line(int); > }; > > </code> > > however, when i do the above, I get: ''dtrace: -h requires one or more > scripts or enabling options? > > (I am following: > http://blogs.sun.com/barts/entry/putting_user_defined_dtrace_probe) > > 2. How to generate custom probe header macros and how does it work? > > > This page here: > http://www.solarisinternals.com/wiki/index.php/DTrace_Topics_USDT#USDT_Macros > hints at it, but is rather incomplete. > > Thank You! > > Regards, > Amit > > -- > http://amitksaha.blogspot.com > http://amitsaha.in.googlepages.com/ > *Bangalore Open Java Users Group*:http:www.bojug.in > > "Recursion is the basic iteration mechanism in Scheme" > --- http://c2.com/cgi/wiki?TailRecursion > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
Amit Saha
2009-Mar-12 03:12 UTC
[dtrace-discuss] Auto-Generating and custom header files for probes
On Wed, Mar 11, 2009 at 12:15 PM, Adam Leventhal <ahl at eng.sun.com> wrote:> You''re missing a ''-s'' option. I think this might be a better reference: > > ?http://blogs.sun.com/ahl/entry/user_land_tracing_gets_betterI am able to generate the headers with the ?-s'' option. (Earlier, I was using it together with h, i.e. -hs ) Thank You very much! Best Regards, Amit> > Adam > > On Mar 10, 2009, at 11:36 PM, Amit Saha wrote: > >> Hi all, >> >> I am trying to understand how to: >> >> 1. Auto generate the probe header from a probes.d file: Isn?t it as >> simple as ?dtrace -h simple_probes.d'', where ?imple_probes.d: >> >> <code> >> >> provider simple { >> probe saw__word(int); >> probe saw__line(int); >> }; >> >> </code> >> >> however, when i do the above, I get: ''dtrace: -h requires one or more >> scripts or enabling options? >> >> (I am following: >> http://blogs.sun.com/barts/entry/putting_user_defined_dtrace_probe) >> >> 2. How to generate custom probe header macros and how does it work? >> >> >> This page here: >> >> http://www.solarisinternals.com/wiki/index.php/DTrace_Topics_USDT#USDT_Macros >> hints at it, but is rather incomplete. >> >> Thank You! >> >> Regards, >> Amit >> >> -- >> http://amitksaha.blogspot.com >> http://amitsaha.in.googlepages.com/ >> *Bangalore Open Java Users Group*:http:www.bojug.in >> >> "Recursion is the basic iteration mechanism in Scheme" >> --- http://c2.com/cgi/wiki?TailRecursion >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org > > > -- > Adam Leventhal, Fishworks ? ? ? ? ? ? ? ? ? ? ? ?http://blogs.sun.com/ahl > >-- http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in "Recursion is the basic iteration mechanism in Scheme" --- http://c2.com/cgi/wiki?TailRecursion
Amit Saha
2009-Mar-12 03:54 UTC
[dtrace-discuss] Auto-Generating and custom header files for probes
2009/3/12 Amit Saha <amitsaha.in at gmail.com>:> On Wed, Mar 11, 2009 at 12:15 PM, Adam Leventhal <ahl at eng.sun.com> wrote: >> You''re missing a ''-s'' option. I think this might be a better reference: >> >> ?http://blogs.sun.com/ahl/entry/user_land_tracing_gets_betterIn the blog post, you have hinted at headers for custom macros: ?and that we use the PROVIDER_PROBE() ...?. However, I cannot see it being used anywhere there. Am I missing something? (Sorry if I am). Thank You very much. Best, Amit -- http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in "Recursion is the basic iteration mechanism in Scheme" --- http://c2.com/cgi/wiki?TailRecursion
Adam Leventhal
2009-Mar-12 05:44 UTC
[dtrace-discuss] Auto-Generating and custom header files for probes
On Mar 11, 2009, at 8:54 PM, Amit Saha wrote:> In the blog post, you have hinted at headers for custom macros: ?and > that we use the PROVIDER_PROBE() ...?. However, I cannot see it being > used anywhere there.In this case <PROVIDER>_<PROBE>() is DATABASE_QUERY_START() for example. PROVIDER and PROBE were meant to be in italics to indicate that they were placeholders for the actual provider and probe names, but the formatting doesn''t make that completely clear. Sorry about that. The USDT documentation in the DTrace guide definitely needs some work which would be a great and much appreciate project if anyone''s interested in taking a crack at it. Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl