Usage: Leafy <switches> <command line>
Leafy is a simple uninterpreted command that the program counter flow at a 10 millisecond interval during the execution of the command line, and prints the results. For example, the following lines were taken from the execution of leafy on the command "spin 1":
% leafy spin 1
-- Leafy output on April 26, 1991 6:14:54 pm PDT for
-- spin 1
-- Elapsed seconds: 1.003, bytes allocated: 336, utime: 0.890, stime: 0.120
-- Total count: 100, modules with counts: 6, procs with counts: 8
84 (84.00%): LeafySampleCommand, startPC: 59058232, size: 14144
50 (50.00%): SpinCommand←P240
34 (34.00%): Nothing←P1500
10 (10.00%): gettimeofday, startPC: 5384232, size: 40
10 (10.00%): gettimeofday
3 (3.00%): HostTimeUnixImpl, startPC: 1303248, size: 1360
2 (2.00%): GetTime←P180
1 (1.00%): TimeToMicroseconds←P240
-- Modules not shown: 3, counts not shown: 3 (3.00%)
A count represents one sample, and the samples are taken roughly every 10 milliseconds. The counts are presented in sorted order, with the module getting the most counts (LeafySampleCommand, in the above example) appearing first. Within each module, the procedure getting the most counts appears first.
The numbers given in the form "X (Y%)" are reporting X counts, for Y percentage of the total counts. Some timing numbers are taken from the DeltaResource command, and are:
Elapsed seconds is the elapsed real time for the command in seconds.
bytes allocated is the number of bytes allocated in the heap.
utime is the Unix measure of user mode processor time in seconds
stime is the Unix measure of system mode processor time in seconds
There are two switches controlling the granularity of the report:
-a shows all samples (no pruning)
-v shows more samples than the default (the cutoff is half the default)
Requirements
First, you must be running a SunOS 4.1 (or later) kernel with the PARC profil patch. If not, Leafy will provide nonsense results.
Second, you must be running PCR with vp = 1 (one virtual processor), or run in Nitro mode (see NitroDieselDoc.tioga). Otherwise the results may not be valid (frequently the number of counts will be entirely too small).
Leafy does not detect either of these requirements being absent.