This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scheme profiler?


Keisuke Nishida <kxn30@po.cwru.edu> writes:

> I wrote:
> > Is there any Scheme code profiler that works with Guile?
> > It seems Guile's core (libguile/eval.c) has no such code in it.
> > Is it a good idea to work on this?  (I guess the debug evaluator
> > may have such facilities...)
> 
> This is actually fairly easy.  Even the patch below gives some
> useful information:

Interesting idea.  But we should use the already existing hooks.
There is something called the `apply-frame-handler' which is called
if you do

  (trap-enable 'apply-frame)

The same handler is called also if you do (debug-enable 'trace).
Look at the implementation of `trace' in (ice-9 debug) to see how to
use the handler.

If you reimplement your profiler using this handler, I'll include it
in the distribution.

[BTW, the arbitration between profiling and tracing might need some
thought...]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]