Your program can control profiling. This is useful when you want to profile only a part of the program.
In your program, call
start collecting profiling information. Call
to temporarily stop collecting, or call
to stop collecting and print the results. At any point you can call
to modify the set of processes for which profiling information is being (or will be) collected.
;; start profiling, current process only
(start-profiling :processes :current)
;; temporarily suspend profiling
(stop-profiling :print nil)
;; resume profiling
(start-profiling :initialize nil)
;; now, all processes are interesting
(set-process-profiling :set :all)
;; stop profiling and print the results
Note: you cannot call
inside the scope of the macro
or while the graphical Profiler is profiling, because the two profiling modes are incompatible.