User guide
3.
Start Delay— Specify a length of time that Shark should wait after being told to start collecting a profile
before the collection begins. If the program action to be profiled requires a sequence of actions to start,
this option can be used to delay the start until after the setup actions have been completed.
Figure 4-4 Malloc Trace mini configuration editor
Using a Malloc Trace
Once you have recorded a Malloc Trace, there are several ways that you can analyze the resulting trace, which
comes up in a window that superficially resembles a standard time profile. Here are a few of the most common
techniques:
●
Profile Browser: Get an Overview— The profile browser from a Malloc Trace, as shown in Using a Malloc
Trace, looks a lot like what you might obtain with a normal Time Profile, but it contains an extra column
listing the amount of memory allocated. In addition, the “Self” and “Total” columns are based on the
number of allocations made using that call instead of execution time. These figures are highlighted in the
figure. By sorting on the “Total” or “Alloc Size” columns in a “Heavy” view, you can see which routines in
your program either make the largest number of allocations or allocate the most memory at a glance. It
Other Profiling and Tracing Techniques
Malloc Trace
Retired Document | 2012-07-23 | Copyright © 2012 Apple Inc. All Rights Reserved.
102










