chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Chicken-Profile exclusive time.


From: felix winkelmann
Subject: Re: [Chicken-users] Chicken-Profile exclusive time.
Date: Mon, 23 Feb 2009 21:09:50 +0100

On Mon, Feb 23, 2009 at 12:16 AM, Nicholas Indy Ray <address@hidden> wrote:
> I'm having a problem while trying to profile a program that is taking
> far too long,
>
> The program is structured so that it makes tail calls back to prior
> functions....
>
>
> (define (func-a p)
>  (if (...)
>     (func-a (... p))
>     (func-b (... p))))
>
> (define (func-b p)
>  (if (...)
>     (func-b (... p))
>     (func-a (... p))))
>
> (func-a ...)
>
>
> So, the problem is that func-a will have taken more inclusive time
> then func-b but only by the amount of time originally spent in it
> before the first call to func-b. After that, all profile information
> seems to be very similar, only really offset by the amount of calls.
> Which is not a very useful metric because even though a function will
> get called less, it'll spend more time in it by virtue of spending
> time in the children functions.
>

But wouldn't that mean one has to identify profiled sub-calls and
subtract their time from the outer caller? That means we need a
call-graph and that information isn't really available.

Hm... Or perhaps maintain the call-graph at runtime. Currently
we simply create a record for each toplevel function and
store entry- and exit times in there.

Ideas are welcome.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]