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:
(contain (setq title (make-instance 'title-pane
This is a simple piece of code which creates and displays a CAPI title pane; each time you run the code a small window is created on-screen, which you can ignore or remove as soon as it is created.
Figure 21.6 Profiler Preferences dialog
This profiles the functions in the
Next, add the
package to the list of packages whose functions are profiled.
CAPIin the Unselected Packages list, and click on OK .
Notice that this time there are many more functions which appear on the stack during profiling.
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
package. It is worth profiling a few functions explicitly, and removing unwanted packages from the list of packages to profile.
funcall unwind-protect make-instance eval
Type the name of each function and press
Now remove the unwanted packages from the list of packages to profile, as follows:
Notice that the four functions in the
package are still being profiled, even though you are no longer profiling all functions from that package by default.