disassemble-profile

Arguments:
name &key current-profile verbose start end

This function prints to *standard-output* a disassembly of the
function denoted by name. In the disassembly,
each instruction is annotated with actual hits on that instruction,
plus a percentage of the total hits in the function. Since the hits
are from a statistical sampling, an estimate can be made as to where
in the function time is being spent (the more hits, the better the
estimate).

A hit that occurs just after (we define just after for
various platforms below) an instruction that does a call probably
means that the function was not itself executing but had called
another function at the time of the hit. A hit that occurs any other
place means the function was actually executing at the time.

By just after above, we mean different things for
different architectures:

On Windows, the
hit is on the instruction after the jsr,
call, or bctrl instruction,
respectively.

There are two hits, both occurring at jumps. The function foo
is defined as:

(defun foo (x)
(fact x)
(bar x))

so all it does it call two other functions, so the dissassembly is
what we would expect in this case.

name must evaluate to a symbol or a
compiled function object or a string. A symbol or compiled function
object identifies a Lisp function. A string identifies a C
function. The disassembler will disassemble C functions on most
platforms. Note that you must use the string that appears in a runtime
analyzer output (such as a call graph or a flat profile).

The current-profile keyword argument
specifies the runtime analyzer data to be disassembled. If no value is
specified, data from the last-run runtime analysis will be used. If a
value is specified, it must be a profile saved with save-current-profile, in which case data
from that runtime analysis will be used.

The verbose keyword argument controls
whether or not messages about the progress of the analysis are printed
to *standard-output*. The messages will be printed
if the value is true and they will not be printed
if the value is nil. The value defaults to
nil. (Note that in the default, both the
messages and the result are printed to *standard-output* so if you rebind *standard-output* to be a stream
open to a file, the messages will be printed to the file as well.)

The start
and end keyword arguments are passed to
cl:disassemble. Allegro CL
enhances cl:disassemble by adding these arguments, which
resemble the start and end
arguments to sequence functions. Both values, if specified, should be
non-negative integers indicating the pc-offset where printing of
disassembled code should start and stop, but there are many
details. See the description of the Allegro CL implementation of
cl:disassemble in Extensions to cl:make-package,
cl:disassemble, cl:open, cl:apropos in
implementation.htm.