chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] debugging chicken itself


From: Brandon J. Van Every
Subject: Re: [Chicken-hackers] debugging chicken itself
Date: Wed, 21 Feb 2007 00:33:06 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

felix winkelmann wrote:
On 2/20/07, Brandon J. Van Every <address@hidden> wrote:
Is there a way to trace Chicken's execution of Scheme code?  I'd like to
see the Scheme code actually executing, even if it is slow.  I'm trying
to figure out if I can improve Chicken's generation of C code for 32-bit
floating point math functions.  I find that the sources really don't
make any sense to me.  If I could see them working, then maybe I'd have
an idea what's going on, what the flow of control is.

Failing that, anyone recommend other ways to visualize the code?  In the
MSVC universe there are typically class browsers, so you can see what
code belongs to what.  I suppose a call graph generator would be
helpful; this is typical of profiling tools.


You can use the tracing and single-stepping commands from the
csi toplevel, but studying the source code really is the best way.

I guess you are talking about unboxed floats: I think this is currently
quite hard to implement. The CPS transformation generates many
small functions, which pass live data on to their continuations. Since
GC can kick in at various times (nearly always), that live data has to
be in a state that can be saved properly before GC and restored
afterwards. Passing unboxed data will require specialized code being
generated (Appel's book "Compiling with Continuations" describes
this quite nicely). In the end the implementation weill become quite
complex and the procedures that benefit from that will be few.


I am far more concerned about the overhead of 1 function call per math operator. This makes it impossible for a C compiler to do any optimization of the code. Boxed floats can at least be de-referenced; it's not optimal but it's not a function call.


Cheers,
Brandon Van Every





reply via email to

[Prev in Thread] Current Thread [Next in Thread]