Comment 3 for bug 554156

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

> 115.50% CPU

Seems to indicate that the body is running multiple threads. Is this correct?

From the docstring of WITH-PROFILING:

       :MODE <mode>
         If :CPU, run the profiler in CPU profiling mode. If :ALLOC, run the
         profiler in allocation profiling mode. If :TIME, run the profiler
         in wallclock profiling mode.

       :THREADS <list-form>
         Form that evaluates to the list threads to profile, or :ALL to indicate
         that all threads should be profiled. Defaults to the current
         thread. (Note: START-PROFILING defaults to all threads.)

         :THREADS has no effect on call-counting at the moment.

         On some platforms (eg. Darwin) the signals used by the profiler are
         not properly delivered to threads in proportion to their CPU usage
         when doing :CPU profiling. If you see empty call graphs, or are obviously
         missing several samples from certain threads, you may be falling afoul
         of this.

You may want to try

  (with-profiling (:threads :all ...) ...)

and

  (with-profiling (:threads :all :mode :time ...) ...)