disassemble-profile

Function

Package: prof

Arguments: name &key type current-profile verbose

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 DEC Alpha, Windows (x86), and RS/6000 platforms, the hit is on the instruction after the jsr, call, or bctrl instruction, respectively.

On HP and SGI/MIPS, the hit occurs on the second instruction after a ble or jalr instruction, respectively, due to the presence of delay instructions.

On Sparcs, the hit occurs exactly at the jmpl instruction.

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 profiler output (such as a call graph or a flat profile).

The current-profile keyword argument specifies the profile data to be disassembled. If no value is specified, data from the last-run profile will be used. If a value is specified, it must be a profile saved with save-current-profile, in which case data from that profile 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.)

This function returns nil.

See profiling.htm for general information on profiling. Note that the profiler is not available with some Allegro CL products.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.