This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Inconsistant Results
- To: Jim Blandy <jimb at savonarola dot red-bean dot com>
- Subject: Re: Inconsistant Results
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 22 Jun 2000 03:04:13 +0200
- Cc: guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <Pine.LNX.4.21.0006211602550.7528-100000@marvin.ida.ing.tu-bs.de><xy7k8fjvxdn.fsf@mdj.nada.kth.se><m3zooepy15.fsf@savonarola.red-bean.com>
Jim Blandy <jimb@savonarola.red-bean.com> writes:
> I'd love to see some profiling support added to Guile. When we're
> using the debugging allocator, could a handler for SIGPROF get access
> to the backtrace?
Did you mean C level support or Scheme level?
From C, it's a piece of cake to access the stack
(scm_last_debug_frame).
Scheme level:
Actually, the "convoluted" way I was referring to might be pretty
good. I was thinking of using `make-stack' just the same way as in
boot-9.scm:save-stack. I thought this involved too much work for
extracting only one frame, but then it occured to me that we might be
interested also in the other frames. This way we could collect
statistics also for how long time was spent in a certain procedure
when being called from a certain other, etc.