[plt-scheme] Profiling code

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Oct 23 08:22:40 EDT 2008

At Tue, 21 Oct 2008 10:19:49 -0700 (PDT), Deep wrote:
> However there are a few functions in my code that get called very
> often and have a very small execution time. I want to know if there is
> an additional cost in terms of "function call overhead" that exists
> for functions beyond their actual execution time.

The overhead for a function call small. Also, if the function is in the
same module as the function call, there's a good chance that a small
function gets inlined.

> On a more general note, I wanted to know how I can observe what my
> code is doing at a slightly lower level of detail. Things I would be
> interested in
> 
> 1) How much memory is being consed.
> 2) When does GC get invoked.

I agree with Noel's suggestion for these.

> 3) What kind of assembly code is getting generated for my functions.

Although there's no facility to show you assembly code, you might try
using `mzc --decompile' on the bytecode form of your code. That would
let you see, for example, whether a function call was inlined.

> 4) Am I hitting some inefficient execution paths with DrScheme.

No idea.


Matthew



Posted on the users mailing list.