To profile a Lisp form using the set-up from the previous example, type:
(profile <forms>)
A typical output would be:
Profile stacks called 40 times Symbol Called Profile (%) Top (%) CAR 400 20 (50) 2 (5) CDR 300 15 (39) 3 (7) Top symbol not monitored 88% of the time.
This means that during the execution of the form, the functioncar was called four hundred times, the functioncdr was called three hundred times, and the Lisp process was interrupted forty times by the profiler. In half of these interrupts it found the functioncar on the stack, but only on two of these occasions wascar on the top of the stack. Thirty-five times the function on the top of the stack was neithercar norcdr.
You can control the order of the output from the profiler usingprint-profile-list.