
|
|

Squares represent objects, each colored uniquely by class. A diamond represents a class object. Squares come in two forms: a single square denotes a single instance, while twin squares represent multiple instances. A node in the view can be a square (single or twin), a diamond, or a combination of the two, depending on the set of objects being represented. Arrows between nodes denote one or more references between instances. An arrow points to the object(s) being referenced. Arrows run right to left by default.
Not all references are shown at once. Objects cascade from left to right as you reveal more and more references. Hidden references are indicated by a "+" in a box to the left of a node. Clicking on this box will expand the tree of references rightward, assuming there are further references. If there are, the "+" changes to a "-", which you can click to recollapse that branch; if there are no further references, the box with the "+" will disappear entirely. You can expand and collapse all nodes at a given level in the tree at once using the buttons marked "Depth" along the upper edge of the view.
A node for the same object(s) may appear more than once, since the view uses a tree to represent a network of object references. A blue upward-pointing arrow identifies a repetition of the same node. Clicking on this arrow will produce a long blue arrow leading to another occurrence of the same node.
To the right of each node appears a count of the number of objects the node represents and the class of the object(s). The count and class name appear in red wherever there are old-generation objects; the number of old instances is then shown also. Old-generation objects are those created prior to a certain point in the trace. You can specify that point as you're taking the trace using the dump population tracing command. Objects created after that point are new-generation objects.
A small circle appearing to the left of a node indicates that this object is referred to by a source other than a Java object. The color of the circle shows the type of reference: green for a Java stack, orange for a local JNI root, and red for a global JNI root.
You may select an object or a group of objects by left-clicking on the appropriate node. Use Control-left-click to select more than one object or group. Nodes will be highlighted in yellow if at least one of the objects represented by the node is currently selected in any view.
Ungroup Objects changes the view to separate the node into individual nodes for each of the objects in the set. Regroup Objects on any of the individual objects returns to the grouped representation. When objects are ungrouped, left clicking on any one in the list selects it and tags it with an asterisk in this popup menu.
The remaining popup menu options are active only when current selections exist. Drill Down from Selected Items lets you open a view that is restricted to the current selections. Create a New Slice will create one or more new slices from the current selections. You can create either a single slice From Selected Items or one slice For Each Selected Item. Choosing Limit an Existing Slice presents the set of execution slices you can choose to limit to Selected Items.
The next four choices are only applicable if your trace contains two memory snapshots: a dump population tracing command prior to the dump references tracing command. These four choices restrict the base set to new generation objects, that is, those that are created between the above two tracing commands. Typically, you expect objects in this new generation base set to be garbage collected. Viewing old generation (red) references to these base set objects can show which references are preventing the garbage collection of the new generation objects.
Sort by Number of References determines how the base set, or each group of references to it, is sorted in the view. If this option is chosen (checked), then nodes with the highest number of references appear at the top of the view. If not chosen, then nodes are sorted alphabetically.
Print Report to data.ctl outputs all visible reference information to a file called data.ctl in the current directory. This file provides a record of the visualization should you want to study it.
A final option, Font Scaling, will make text grow and shrink just
like other elements of the view when it's zoomed. Text remains a constant
size by default.
Zooming can be done in several ways. One is to drag the mouse over a rectangular
area to zoom in on. Another is to use the plus and minus keys to zoom in
and out. Additional menu options remember previous zoom positions you have
traversed, and allow you to return to them. Toggle Zoom alternates
between the two most recent zoom positions viewed. If you use Mark Zoom
to save the current zoom position, then you can go to it later using the
option Zoom To Mark. Also, a partial history of zoom positions is
kept, using the most recent branch taken. Thus you can move back and forth
along this zoom path history, with Zoom Back and Zoom Forward.
The status line displays specific information about the object(s) underneath the mouse pointer, including
See also Using Slices in the Reference Pattern View for a discussion of the effect of workspace filtering on this view.
With tracing commands, you can delineate objects into two groups: an old generation set of objects that exist before a particular application activity, and a new generation set of objects that appear during the application activity. The view can then show the new generation objects that were not garbage collectible after that application activity. The view also identifies the old generation objects (labeled in red) still holding references to them and preventing their collection.
If you suspect a memory leak related to a particular activity in your
application, you should introduce a generation boundary, using the dump
population tracing command (Ctrl-Brk dp), prior to invoking the target
activity. Then issue a Ctrl-Brk dr command after the target
activity completes to take the snapshot of references.

Once you have selected an object in this view, you can use the the Execution Pattern view to study the interactions that produced the object's references.
See also Understanding memory usage and data structures in the Jinsight How-To Guide.
|
|