AW: [plt-scheme] Question on profiling

From: Ballnat, Stefan (Stefan.Ballnat at
Date: Thu Mar 5 08:54:00 EST 2009

Thanks, that made it more clear.

But is there a way of multiple library profiling? For example, to open the library where the tailed-call function is defined (analogue to multiple file debugging).
Our project consists of about 30 self-written and a lot more imported libraries. And profiling every single library cannot be the solution (at least, I hope so).

- Stefan

-----Ursprüngliche Nachricht-----
Von: Matthew Flatt [mailto:mflatt at] 
Gesendet: Donnerstag, 5. März 2009 14:22
An: Ballnat, Stefan
Cc: plt-scheme at
Betreff: Re: [plt-scheme] Question on profiling

This may be because the time attributed to a function does not include
tail calls from the function, and maybe your program is spending all
its time in library functions that are tail-called.

For example, profiling

 #lang scheme

 (define (all i)
   (if (zero? i)
         (compute i)
         (all (sub1 i)))))

 (define (compute i)
   (build-list i add1))
 (all 10000)

shows that all the time is in `all', but almost no time is in
`compute'. Most of use would be inclined to say that all the time in
this program is in `compute' during the call to `build-list'. From the
profiler's perspective, however, the call to `build-list' is not inside
`compute', since it's a tail call.

Posted on the users mailing list.