This is the mail archive of the guile@cygnus.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: Profiling & tracing & questions.


Maybe an answer to your question is now obsolete, but here it goes...

hjstein@bfr.co.il (Harvey J. Stein) writes:

> After looking at the tracing code in guile, it seems like I can do
> profiling the same way guile does tracing - by hanging profile-entry
> & profile-exit fcns off of apply-frame-handler & exit-frame-handler,
> respectively.

That seems likely.

> However, I have a question about the tracing code.
> 
> Why is it that apply-frame-handler & exit-frame-handler only seem to
> get called when a procedure's property list has a value of #t for the
> trace property?

Non-existent documentation.

They are also called if the apply-frame and exit-frame traps are
enabled:

  (trap-enable 'apply-frame)
  (trap-enable 'exit-frame)

This works even if the debug-option trace isn't enabled.

(BTW, as with the other library option interfaces, you can get a
 verbose listing: Try (traps #t))

/mdj