The examples below demonstrate different ways in which the profiler can be configured and code profiled so as to produce different sets of results. In each example, the following piece of code is profiled:
(dotimes (x 1000)
(capi:make-container
(make-instance 'capi:title-pane
:text "Title")))
This is a simple piece of code which makes some CAPI objects.
Figure 22.6 Profiler Preferences
CAPI
and click
.
This profiles the functions in the
COMMON-LISP
,
CL-USER
and
LISPWORKS
packages.
Next, add the
CAPI
package to the list of packages whose functions are profiled.
CAPI
in the
Unselected Packages
list, and click on
OK
.Notice that this time there are many more functions which appear in the profile results.
Add the Description area by clicking the Description >> button if you have not already done so.
Notice that most of the functions appearing on the stack are in the
CAPI
package. It is worth profiling a few functions explicitly, and removing unwanted packages from the list of packages to profile.
merge find-class make-char functionp
Type the name of each function and press
Return
or click
to add it to the list.
Now remove the unwanted packages from the list of packages to profile, as follows:
Notice that the four functions in the
COMMON-LISP
package are still being profiled, even though you are no longer profiling all functions from that package by default.
LispWorks IDE User Guide (Macintosh version) - 25 Nov 2011