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 scheme code


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

> >Are there any profiling tools (akin to gprof) for Guile?
> >Any suggestions?
> 
> Not that I know of; I'd love to have one.
> 
> You might look at the code that implements procedure tracing; you may
> be able to add something to that gracefully.  I don't want to
> incorporate any interpreter changes that slow down unprofiled code,
> but I think one could implement profiling without adding any overhead
> beyond what's already there for tracing.

I just want to corroborate what Jim says: The mechanisms in the
interpreter by which tracing works is the mechanisms that should be
used in a profiler.

However, I should warn you that the scheme-level support for those
mechanisms (in boot-9.scm) is far from finished.  So, if you want to
start hacking on a profiler, you might want to implement a more
generalized way of hooking into those mechanisms.

Also, if there is a well motivated need to change things on the C
level, we will do so.

Best regards,
/mdj