The profiler has two distinct modes. You can use both in the same session, but not at the same time.
To use either mode, you must first call set-up-profiler to load the profiler and set its parameters including the output format.
profile simply profiles all processes while a body of code is run, as described in Using the macro profile. Start profiling this way if you don't see a need to use the alternate mode.
Alternatively the functions
set-process-profiling offer programmatic control over when profiling occurs and which processes are profiled. This is described in Programmatic control of profiling.
do-profiling is a convenience function which allows you to profile multiple threads using start-profiling and stop-profiling.
This evaluates the forms as an implicit
progn and prints the results, according to the parameters established by set-up-profiler.
In your program, call
start-profiling start collecting profiling information. Call
stop-profiling with print
nil to temporarily stop collecting, or call stop-profiling with print
t to stop collecting and print the results. At any point you can call
set-process-profiling to modify the set of processes for which profiling information is being (or will be) collected.
LispWorks User Guide and Reference Manual - 20 Sep 2017