ADOBE FLEX BUILDER 3
Using Adobe Flex Builder 3
170
The following example shows the Allocation Trace table in the Object References view:
The following table describes the columns in the Allocation Trace table:
You can only view data in this table when you enable allocation traces when you start the profiler.
You can open the source code of the selected class by double-clicking a class in this table.
Using the Allocation Trace view
The Allocation Trace view shows which methods were called between two memory snapshots and how much
memory was consumed during those method calls. To open the Allocation Trace view, you select two memory
snapshots, and then click the View Allocation Trace button. For information on recording a memory snapshot, see
“Using the Memory Snapshot view” on page 168.
The result of the memory snapshot comparison is a list of methods that Flash Player executed between the two
memory snapshots. For each of these methods, the profiler reports the number of objects created in that method.
You can use this information to optimize performance. After you identify methods that create an excessive number
of objects, you can optimize those hot spots.
To use the Allocation Trace view, you must enable allocation traces when you start the profiler. The default is
disabled.
Column Description
Method The top-level method in this table is the method that created the instance of the class that is listed in the Instances
table.
You can expand the method to show the stack trace of the method. This can help you determine where the call stack
began.
Location The file where the method is defined.
Line The line number in the file.
ADOBE FLEX BUILDER 3
Using Adobe Flex Builder 3
171
The following example shows the Allocation Trace view:
The following table describes the columns in the Allocation Trace view:
When recording methods during sampling intervals, the profiler also records internal Flash Player actions. These
actions show up in the method list in brackets and appear as
[mouseEvent] or [newclass] or with similar names.
For more information about internal Flash Player actions, see “How the Flex profiler works” on page 157.
To open the Object Statistics view, click a row in the Allocation Trace table. This view provides details about the
objects that were created in the method that you selected. It also lets you drill down into the objects that were created
in methods that were called from this method. For more information, see “Using the Object Statistics view” on
page 172.
You limit the data in the Allocation Trace view by using the profiler filters. For more information, see “A b o u t p r o f i l e r
filters” on page 183.
Column Description
Method The method that was called during the snapshot interval. This column also contains the class whose instance
called this method.
Package The package that each class is in. If the class is not in a package, then the value of this field is the file name that
the class is in. The number following the dollar sign is a unique ID for that class.
If the Package field is empty, the class is in the global package or the unnamed package.
Cumulative Instances The number of objects instantiated in this method and all methods called from this method.
Self Instances The number of objects instantiated in this method. This does not include objects that were instantiated in
subsequent method calls from this method.
Cumulative Memory The amount of memory, in bytes, used by the objects instantiated in this method and all methods called from
this method.
Self Memory The amount of memory, in bytes, used by the objects instantiated in this method. This does not include the
memory used by objects that were instantiated in subsequent method calls from this method.
Get ADOBE® FLEX® BUILDER™ 3: USING ADOBE FLEX BUILDER 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.