On Wed, Dec 16, 2009 at 3:19 PM, Hillel (Sabba) Markowitz
<sabbahil...@gmail.com> wrote:
>
> However, what I am worried about is a set where
>
> ->A
>  ->B
>     ->C
>     <-C
>   <-B
> <-A
>
>
> ->D
>  ->C
>  <-C
> <-D
>
> This would seem to not aggregate the C as the ustackdepth for the two
> usages of C would be different. In this case, I do want to have the
> counts aggregated.

The code I posted should aggregate the time spent in C.  Note that
@func_time is indexed by [probemod, probefunc] only, not including
ustackdepth.

> What I want to handle is the case
>
>
> ->A
>  ->A
>    ->A
>    <-A
>   <-A
> <-A
>
> That is the case that actually wiped out what happened before. How do
> I handle this? The fix that you just sent me would seem to handle it,
> but how do I see the difference between the two cases?

So here you want to see the exclusive time spent in A at each level of
recursion?  Then you'd need to add ustackdepth (or some variable of
your own that's keeping track of recursion depth) as in index to your
aggregation.  (You might want an array to keep track of recursion
depth per function, in case you have the case A -> B -> A -> B.)

Chad
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to