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: Guile profiling tools?


>>>>> "Jim" == Jim Blandy <jimb@red-bean.com> writes:

Jim> I'd encourage folks to take a stab at this; post your code to the
Jim> list.

I am working at a simple solution, using Harvey Steins excellent idea
about hooking into the trace facility. I'll post my results when I
have something working, presumably during this weekend.

My current code will only profile functions that have been explicitly
instrumented (having the trace property set to true), which isn't
perfect but better than nothing (and it will instrument whole modules
in one fell swoop, so it isn't that bad).

Harvey Stein was asking why only functions with the trace property
would be traced. Having spent some time yesterday on the issue
(substituting experiments for philosophical reasoning) the answer
seems to be that enabling tracing on *every* apply would yield an
infinite loop since the trace handler (and surrounding facilities such
as the repl) would need to do applys also. If this is to work, there
needs to be some mechanism that would allow the code in the evaluator
to decide when to trace the apply and when not to. Ideas are welcome.

PS

One of the questions I am trying to analyze is wht happened to the
performance in recent snapshots. We have been developing with snapshot
1990315 and I wanted to update to a more recent snapshot (19980804)
but our code seems to run much slower in the new than in the old (a
full minute slower in a 2-3 minute run). Profiling at the C level did
not indicate that performance is lost for other reasons than the
scheme level is working harder (more time in eval and gc, more
calls to cons, more collections etc.). Does this ring a bell anywhere?


---------------------------+--------------------------------------------------
Christian Lynbech          | Telebit Communications A/S                       
Fax:   +45 8628 8186       | Fabrik 11, DK-8260 Viby J
Phone: +45 8628 8177 + 28  | email: chl@tbit.dk --- URL: http://www.telebit.dk
---------------------------+--------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)