5 The @code{sb-sprof} module provides an alternate profiler which works by
6 taking samples of the program execution at regular intervals, instead of
7 instrumenting functions like @code{profile} does. You might find
8 @code{sb-sprof} more useful than @code{profile} when profiling functions
9 in the @code{common-lisp}-package, SBCL internals, or code where the
10 instrumenting overhead is excessive.
12 This module is known not to work consistently on the Alpha platform,
13 for technical reasons related to the implementation of a machine
14 language idiom for marking sections of code to be treated as atomic by
15 the garbage collector; However, it should work on other platforms,
16 and the deficiency on the Alpha will eventually be rectified.
18 @subsection Example Usage
22 (sb-sprof:start-profiling)
25 (dotimes (i (expt 2 26))
26 (setf *a* (logxor *a* (* i 5)
29 (sb-sprof:stop-profiling)
33 The profiler hooks into the disassembler such that instructions which
34 have been sampled are annotated with their relative frequency of
35 sampling. This information is not stored across different sampling
36 runs. @c FIXME: maybe it should be?
40 @include fun-sb-sprof-report.texinfo
42 @include fun-sb-sprof-reset.texinfo
44 @include fun-sb-sprof-start-profiling.texinfo
46 @include fun-sb-sprof-stop-profiling.texinfo
50 @include macro-sb-sprof-with-profiling.texinfo
54 @include var-sb-sprof-star-max-samples-star.texinfo
56 @include var-sb-sprof-star-sample-interval-star.texinfo
60 @code{sb-sprof} is an SBCL port, with enhancements, of Gerd
61 Moellmann's statistical profiler for CMUCL.