On Mon, Feb 23, 2009 at 12:16 AM, Nicholas Indy Ray <[email protected]> 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 _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
