5.7 Troubleshooting tracing
This section describes some of the common problems seen when tracing, with suggestions to overcome these.
5.7.1 Excessive output
In general it is not useful to trace
cl:length and other base-level functions unconditionally because they are called too frequently by LispWorks itself.
It may be useful to trace these functions in a limited fashion, using the trace options :inside or :when.
5.7.2 Missing output
There are two common reasons for not seeing calls you expect in trace output.
220.127.116.11 Compiled code may not call the functions you expect
There are many other optimizations built-in to the LispWorks compiler, which affect code generated according to the compiler qualities in effect at compile-time. For example if the compiler was set to inline structure accessors, then tracing structure accessors in code compiled with that setting will produce no output.
While debugging, you could re-compile the code at higher safety or run it interpreted, to obtain the trace output.
18.104.22.168 trace works on function names, not function objects
trace works by tracing function names, not function objects.
Therefore tracing function objects, for example by
will not yield any trace output. Instead you need to do
Also, if the symbol
foo is traced, then code which invokes
(funcall (symbol-function 'foo) ...)
(funcall #'foo ...)
will not produce any trace output.
The correct approach is to use
(funcall 'foo ...) instead of
(funcall #'foo ...).
LispWorks User Guide and Reference Manual - 20 Sep 2017