From: Stefan Voss
Subject: Re: Tracing function calls in lisp code
Date: 
Message-ID: <1svqg0INN6pq@iraun1.ira.uka.de>
In article <······················@pasteur.Berkeley.EDU>, ·····@robocop.berkeley.edu (Sanjay Sarma) writes:
|> 
|> Hi, 
|> 
|> I have to understand and modify a large chunk of lisp code. Is there a 
|> program out there that will trace function calls for me and present them
|> as a tree (list or (!)graphical output) ?

Just use (trace function) and all calls to function along with their parameters
and results will be sent to the output.
Example:
> (trace +)
(+)
> (+ 3 4) 
1 Enter + 3 4
1 Exit + 7
7
>  

Stefan Voss
(····@ira.uka.de)
From: Richard Lynch
Subject: Re: Tracing function calls in lisp code
Date: 
Message-ID: <lynch-170593112737@lynch.ils.nwu.edu>
In article <············@iraun1.ira.uka.de>, ····@i40s16.ira.uka.de (Stefan
Voss) wrote:
\> 
\> In article <······················@pasteur.Berkeley.EDU>,
·····@robocop.berkeley.edu (Sanjay Sarma) writes:
\> |> I have to understand and modify a large chunk of lisp code. Is there
a 
\> |> program out there that will trace function calls for me and present
them
\> |> as a tree (list or (!)graphical output) ?
\\> 
\> Just use (trace function) and all calls to function along with their
parameters
\> and results will be sent to the output.
\> Example:
\> > (trace +)
\> (+)
\> > (+ 3 4) 
\> 1 Enter + 3 4
\> 1 Exit + 7
\> 7

There may be exceptions to this.  For example, a compiler may be smart
enough to perform magic (in-line/convert-to-iteration) on some functions so
that calls are not made as written.
You can declaim a function notinline to guarantee this won't happen, but it
may slow things down considerably.

-- 
--
-- "TANSTAAFL"  Rich ·····@ils.nwu.edu