Next Previous Up Top Contents Index

10 The HCL Package

print-profile-list

Function

Summary

Prints a list of all symbols that have been profiled.
Package

hcl

Signature

print-profile-list &key sort limit => symbol-list

Arguments

sort

Determines which result is used to sort the list of profiled symbols. It may be one of three values :

:call -- sort by the number of times each function was called.

:profile -- sort by the number of times the function was found on the stack.

:top -- sort by the number of times the function was found on the top of the stack.

If sort is omitted then the profiled symbols are printed as after the profiling run. The default is the value of the variablehcl:*default-profiler-limit*, which itself has default value:sort.

limit

The maximum number of symbols to print. The default is the value of the variablehcl:*default-profiler-sort*, which has the default value 100,000,000.

Values

Returns a tabulated list of symbols, displayed within the parameters defined in any arguments given.
Description

After profiling a Lisp form using the functionprofile, the symbols profiled may be printed out in order usingprint-profile-list. Thus, for example, the symbols found most often on the top of the stack can be quickly found. print-profile-list prints out a tabulated list of all the symbols which have been profiled showing how often each was called, profiled and found on the top of the stack.
Example

First set up the profiler :
USER 4> (set-up-profiler :symbols '(car cdr maphash +))

USER 5> (profile (dotimes (a 100) (print (+ a a)) (print car '(foo))))

Then callprint-profile-list:
USER 6> (print-profile-list :sort :call)

profile-stacks called 24 times Symbol                            called profile (%)     top  %) +                                   100       1 ( 4)       1 ( 4) CAR                                 100       0 ( 0)       0 ( 0) SYSTEM::DUMMY-STRUCTURE-ACCESSOR     12       0 ( 0)       0 ( 0) SYSTEM::DUMMY-STRUCTURE-SETTER       12       0 ( 0)       0 ( 0) MAPHASH                               1       0 ( 0)       0 ( 0) Top of stack not monitored 96% of the time

Notes

You can suppress printing of those symbols that are currently profiled but which were not called in the profiling run by setting the variablesystem::*print-out-all* tonil. The default value for*print-out-all* isnil. (This variable is loaded on demand byset-up-profiler.)

LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker