<html lang="en"> <head> <title>Deterministic Profiler - SBCL 1.0.31 User Manual</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="SBCL 1.0.31 User Manual"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Profiling.html#Profiling" title="Profiling"> <link rel="next" href="Statistical-Profiler.html#Statistical-Profiler" title="Statistical Profiler"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This manual is part of the SBCL software system. See the `README' file for more information. This manual is largely derived from the manual for the CMUCL system, which was produced at Carnegie Mellon University and later released into the public domain. This manual is in the public domain and is provided with absolutely no warranty. See the `COPYING' and `CREDITS' files for more information. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Deterministic-Profiler"></a> <p> Next: <a rel="next" accesskey="n" href="Statistical-Profiler.html#Statistical-Profiler">Statistical Profiler</a>, Up: <a rel="up" accesskey="u" href="Profiling.html#Profiling">Profiling</a> <hr> </div> <!-- node-name, next, previous, up --> <h3 class="section">15.1 Deterministic Profiler</h3> <p><a name="index-Profiling_002c-deterministic-582"></a> The package <code>sb-profile</code> provides a classic, per-function-call profiler. <p><strong>NOTE</strong>: When profiling code executed by multiple threads in parallel, the consing attributed to each function is inaccurate. <p><a name="Macro-sb_002dprofile_003aprofile"></a> <div class="defun"> — Macro: <b>sb-profile:profile</b><var> &rest names<a name="index-sb_002dprofile_003aprofile-583"></a></var><br> <blockquote><p><a name="index-sb_002dprofile_003aprofile-584"></a><code>profile</code> Name* <p>If no names are supplied, return the list of profiled functions. <p>If names are supplied, wrap profiling code around the named functions. As in <code>trace</code>, the names are not evaluated. A symbol names a function. A string names all the functions named by symbols in the named package. If a function is already profiled, then unprofile and reprofile (useful to notice function redefinition.) If a name is undefined, then we give a warning and ignore it. See also <code>unprofile</code>, <code>report</code> and <code>reset</code>. </p></blockquote></div> <p><a name="Macro-sb_002dprofile_003aunprofile"></a> <div class="defun"> — Macro: <b>sb-profile:unprofile</b><var> &rest names<a name="index-sb_002dprofile_003aunprofile-585"></a></var><br> <blockquote><p><a name="index-sb_002dprofile_003aunprofile-586"></a>Unwrap any profiling code around the named functions, or if no names are given, unprofile all profiled functions. A symbol names a function. A string names all the functions named by symbols in the named package. <code>names</code> defaults to the list of names of all currently profiled functions. </p></blockquote></div> <p><a name="Function-sb_002dprofile_003areport"></a> <div class="defun"> — Function: <b>sb-profile:report</b><var><a name="index-sb_002dprofile_003areport-587"></a></var><br> <blockquote><p><a name="index-sb_002dprofile_003areport-588"></a>Report results from profiling. The results are approximately adjusted for profiling overhead. The compensation may be rather inaccurate when bignums are involved in runtime calculation, as in a very-long-running Lisp process. </p></blockquote></div> <p><a name="Function-sb_002dprofile_003areset"></a> <div class="defun"> — Function: <b>sb-profile:reset</b><var><a name="index-sb_002dprofile_003areset-589"></a></var><br> <blockquote><p><a name="index-sb_002dprofile_003areset-590"></a>Reset the counters for all profiled functions. </p></blockquote></div> </body></html>