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