2
We have added a facility for determining the proportional amount of
3
time spent executing compiled lisp defined functions, as well as
4
internal c defined functions.
6
This system works under Unix BSD or System V.
8
To use this code load the file lsp/profile.o.
10
SET-UP-PROFILE &optional (array-size 100000)(max-funs 6000)
13
must be called to allocate space for storing the profile information
14
as it is collected, and also to build a list of the functions from
15
the symbol table of the executable (defaults to "saved_kcl").
17
Once this has been done a call to
21
START will correspond to the beginning of the profile array, and
22
the SCALE will mean that 256 bytes of code correspond to SCALE bytes in the
25
Thus if the profile array is 1,000,000 bytes long and the code segment is
26
5 megabytes long you can profile the whole thing using a scale of 50
27
Note that long runs may result in overflow, and so an understating of the
30
With a scale of 128 a sample loop overflowed some slots at 6,000,000
31
times through the loop.
33
There is very little slowdown in execution during profiling. No special
34
compilation is necessary.
36
To display the result do
40
To turn off profiling use (si::prof 0 0).
43
clears the profile array for a new run.