Amit k. Saha
2009-Feb-07 13:27 UTC
[dtrace-discuss] Defining probes for user level process
Hell all, I am working on an article on DTrace. I am trying to explain that there are basically two (or more?) ways in which probes can be written for user level processes. Here is what I know and have written: "" For user-level code, there are two ways in which probes can be defined- User-Level Statically Defined Tracing (USDT) or PID provider. In USDT, custom probe points are inserted into application code according to well defined guidelines and practices. Once the custom probe points are integrated and the application code is compiled and the binary is run, the probes become available for consumption by DTrace user level consumers. Note that, the probe points are activated only when the binary is running. Does this mean that DTrace cannot be used with applications with no USDT probes defined? No. The PID provider can be used to probe any user level process, whether USDT probes was defined for it or not. Using the PID provider is a very generic and easy way to play around with DTrace. Code a simple application in your favorite programming language and have fun with DTrace by observing the function call flow, stack trace and lots more """ Could any of you please verify the correctness of what I know? Thanks a lot! Best, Amit -- Amit Kumar Saha 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 k. Saha
2009-Feb-07 13:38 UTC
[dtrace-discuss] Defining probes for user level process
On Sat, Feb 7, 2009 at 6:57 PM, Amit k. Saha <amitsaha.in at gmail.com> wrote:> Hell all,Hello all :-)> > I am working on an article on DTrace. I am trying to explain that > there are basically two (or more?) ways in which probes can be written > for user level processes. Here is what I know and have written: > > "" > > For user-level code, there are two ways in which probes can be > defined- User-Level Statically Defined Tracing (USDT) or PID provider. > > In USDT, custom probe points are inserted into application code > according to well defined guidelines and practices. Once the custom > probe points are integrated and the application code is compiled and > the binary is run, the probes become available for consumption by > DTrace user level consumers. Note that, the probe points are activated > only when the binary is running. > > Does this mean that DTrace cannot be used with applications with no > USDT probes defined? No. > > The PID provider can be used to probe any user level process, whether > USDT probes was defined for it or not. Using the PID provider is a > very generic and easy way to play around with DTrace. Code a simple > application in your favorite programming language and have fun with > DTrace by observing the function call flow, stack trace and lots more > """ > > Could any of you please verify the correctness of what I know? > > > Thanks a lot! > > Best, > Amit > -- > Amit Kumar Saha > 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 Kumar Saha 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
Chip Bennett
2009-Feb-08 02:27 UTC
[dtrace-discuss] Defining probes for user level process
Amit, The idea of USDT probes is to "blackbox" the application so that 1) the DTrace script writer doesn''t have to know or understand the underlying source code, 2) the DTrace script writer can work with application high level abstractions rather than function names, and 3) By abstracting the DTrace interface, the application author doesn''t have to worry about breaking the DTrace script when he changes the code later. For more explanation, take a look at "Defining your own application probes" in http://www.laurustech.com/Learning%20DTrace_Part5.pdf Chip> -----Original Message----- > From: dtrace-discuss-bounces at opensolaris.org [mailto:dtrace-discuss- > bounces at opensolaris.org] On Behalf Of Amit k. Saha > Sent: Saturday, February 07, 2009 7:38 AM > To: Solaris Dtrace List > Subject: Re: [dtrace-discuss] Defining probes for user level process > > On Sat, Feb 7, 2009 at 6:57 PM, Amit k. Saha <amitsaha.in at gmail.com> > wrote: > > Hell all, > > Hello all :-) > > > > > I am working on an article on DTrace. I am trying to explain that > > there are basically two (or more?) ways in which probes can be > written > > for user level processes. Here is what I know and have written: > > > > "" > > > > For user-level code, there are two ways in which probes can be > > defined- User-Level Statically Defined Tracing (USDT) or PID > provider. > > > > In USDT, custom probe points are inserted into application code > > according to well defined guidelines and practices. Once the custom > > probe points are integrated and the application code is compiled and > > the binary is run, the probes become available for consumption by > > DTrace user level consumers. Note that, the probe points are > activated > > only when the binary is running. > > > > Does this mean that DTrace cannot be used with applications with no > > USDT probes defined? No. > > > > The PID provider can be used to probe any user level process,whether> > USDT probes was defined for it or not. Using the PID provider is a > > very generic and easy way to play around with DTrace. Code a simple > > application in your favorite programming language and have fun with > > DTrace by observing the function call flow, stack trace and lotsmore> > """ > > > > Could any of you please verify the correctness of what I know? > > > > > > Thanks a lot! > > > > Best, > > Amit > > -- > > Amit Kumar Saha > > 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 Kumar Saha > 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