All Manuals > LispWorks User Guide and Reference Manual > 32 The HCL Package

NextPrevUpTopContentsIndex

start-profiling

Function
Summary

Starts collecting profiling information.

Package

hcl

Signature

start-profiling &key initialize processes profile-waiting

Arguments

initialize

A boolean.

processes

One of :current , :all , a mp:process or a list of mp:process objects.

profile-waiting

A boolean.

ignore-in-foreign

A boolean.

Description

The function start-profiling starts collecting profiling information.

If initialize is non-nil any profiling information collected so far is discarded. The default value of initialize is t .

If processes is supplied, the set of processes that will be profiled is set as if by calling:

(set-process-profiling :set :processes processes )

Otherwise, the set of processes remains unchanged, so is controlled by any previous calls to set-process-profiling.

profile-waiting is used only in SMP LispWorks. When profile-waiting is true, processes that are marked for profiling are profiled even if they are in a wait state. In non-SMP LispWorks, only processes that are active are profiled.

ignore-in-foreign controls whether to ignore processes that are inside foreign calls. The default value of ignore-in-foreign is nil .

start-profiling can be repeatedly called without intervening calls to stop-profiling, for example to change the setting of profile-waiting or the profiled processes.

start-profiling cannot be used while profile is used or while the Profiler tool is profiling (on any thread). Between the call to start-profiling and the next call to stop-profiling with print t (or omitted), profile and the Profiler tool cannot be used.

Various parameters which are set by set-up-profiler control the behavior of the profiler. See the documentation for set-up-profiler.

Examples

The following sequence of calls to start-profiling and stop-profiling can be used to profile only interesting work and print the results:

Start profiling the current process:

(start-profiling :processes :current)
(do-interesting-work)

Temporarily suspend profiling:

(stop-profiling :print nil)
(do-uninteresting-work)

Resume profiling:

(start-profiling :initialize nil)
(do-more-interesting-work)
(stop-profiling)
See also

profile
do-profiling
set-process-profiling
stop-profiling


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex