Russ Petruzzelli stated:
< I would like to have a script that is similar to the jflow.d example.  I 
< would like it to wait for entry into a particular java method.  Then I 
< want it to show the flow until it exits the method again.  
< 
< Ideally, I am trying to see what servlet initiates calls into a java 
< method deep within the sun application server itself.  The problem is an 
< overwhelming stream  of ouput/information that I need to filter.  I'm 
< assuming a predicate is needed but I can't nail down how to do it.

 You want to set a variable to true when you enter the particular java method, 
and
  then set that variable to false when that java method returns.

 Something like:

BEGIN
{
        self->start_flow = 0;
}

/* only have things fire and start the flow if self->start_flow == 1 */
hotspot*::my_method:method-entry
{
        self->start_flow = 1;
}

hotspot*:::method-entry
/self->start_flow/
{
...
}

hotspot*:::method-return
/self->start_flow/
{
...
}

/* ok, finished with my_method, stop the flow */
hotspot*::my_method:method-return
/self->start_flow/
{
        self->start_flow = 0;
        /* or exit even */
}

< 
< Thanks,
< Russ

Regards,
-- 
Sean.
.
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to