All Manuals > LispWorks IDE User Guide > 23 The Profiler


23.3 A description of profiling

When code is being profiled, the Lisp process running that code is interrupted regularly at a specified time interval. At each interruption, the Profiler scans the execution stack and records the name of every function found, including a note of the function at the top of the stack. Moreover, a snapshot of the stack is recorded at each interruption, so we know not merely how many times we reach a function call, but also how we reached that call.

When profiling stops (that is, when the code being profiled has stopped execution) the Profiler presents the data in two tabs.

Note: The Profiler tool only shows the thread running code in the Code To Profile box. It does not profile other threads. To profile multiple threads in the Listener, see "Running the profiler" in the LispWorks User Guide and Reference Manual .

23.3.1 Description of call tree data

The Call Tree is collated from all the stack snapshots taken during profiling. The Call Tree tab shows a graph in which:

Each parent node represents the caller function, so that the ancestors of each leaf node represent the entire stack. The graph edges are labelled with the time spent in the child call as a percentage of the time spent in the parent call, these times averaged over all the profile data collected.

23.3.2 Description of cumulative data

The Cumulative tab shows aggregated information about each function that includes the following information:

With a suitable profiler setup it also shows:

Note: by default the Profiler does not count function calls, because this can distort results significantly in SMP LispWorks. Therefore the Call# column shows 0 for each function. To make the Profiler count calls, evaluate this:

(set-up-profiler :call-counter t)

LispWorks IDE User Guide (Macintosh version) - 12 Feb 2015