Allocation Call Tree | ![]() ![]() |
![]() |
The allocation call tree shows a top-down call tree cumulated for all
threads and filtered according to the
filter settings which
is similar to the one shown in the
call tree view in JProfiler's
CPU section except that it shows allocations
of class instances and arrays instead of time measurements.
In order to prepare an allocation call tree, you have to click on the
Before the allocation call tree is calculated, the allocation options dialog is shown. The class or package selection as well as the selected liveness mode are displayed at the top of the allocation call tree view. |
![]() |
JProfiler automatically detects Java EE components
and displays the relevant nodes in the allocation call tree with special icons that depend
on the Java EE component type:
![]() ![]() ![]() For JSPs and EJBs, JProfiler shows a display name:
If URL splitting is enabled,
each request URL creates a new node with a
You can disable both Java EE component detection as well as URL splitting on the Java Subsystems tab of the profiling settings. Also, the URL splitting method can be customized in the profiling settings or with a custom handler in the profiling API. |
![]() |
The allocation call tree view has an aggregation level selector. It allows you
to switch between
When you switch between two aggregation levels, JProfiler will make the best effort to preserve your current selection. When switching to a a more detailed aggregation level, there may not be a unique mapping and the first hit in the allocation call tree is chosen. The allocation call tree doesn't display all method calls in the JVM, it only displays
A particular node is a bridge node if it would normally not be displayed in the view, but has descendant nodes that have to be displayed. The icons of bridge nodes are grayed out. For the allocation call tree view this is the case if the current node has no allocations, but there are descendant nodes that have allocations. |
![]() |
When navigating through the allocation call tree by opening
method calls, JProfiler automatically expands methods which are only called
by one other method themselves.
To quickly expand larger portions
of the allocation call tree, select a method and choose
If you want to
collapse an opened part of the allocation call tree, select the
topmost method that should remain visible and choose
|
![]() |
If a method node is selected, the context menu allows you to quickly add a
method trigger for the selected method with the
![]() |
![]() |
Nodes in the allocation call tree can be hidden by selecting them and hitting the DEL key
or by choosing Hide Selected from the context menu. Percentages will be corrected accordingly as if the
hidden node did not exist.
All similar nodes in other call stacks will be hidden as well.
When you hide a node, the toolbar and the context menu will get a |
![]() |
The tree map selector above the allocation call tree view allows you to switch to
an alternate visualization: A tree map that shows all call stacks as a set of nested rectangles.
Please see the Wikipedia page on tree maps
for more information on tree maps in general.
Each rectangle represents a particular call stack. The area of the rectangle is proportional to the length of the percentage bar in the tree view. In contrast to the tree, the tree map gives you a flattened perspective of all leafs in the tree. If you're mostly interested in the dominant leafs of the call trees, you can use the tree map in order to find them quickly without having to dig into the branches of the tree. Also, the tree map gives you an overall impression of the relative importance of leaf nodes. By design, tree maps only display values of leaf nodes. Branch nodes are only expressed in the way the leaf nodes are nested. For non-leaf nodes which have significant inherent values, JProfiler constructs synthetic child nodes. In the diagram below, you can see that node A has an inherent value of 20% so that its child nodes have a sum of 80%. To show the 20% inherent value of A in the tree map, a synthetic child node A' with a total value of 20% is created. It is a leaf node and a sibling node of B1 and B2. A' will be shown as a colored rectangle in the tree map while A is only used for determining the geometric arrangement of its child nodes B1, B2 and A'.
The tree map is shown up to a maximum nesting depth of 25 levels. The depth of the call stack of a particular leaf in the tree map is encoded in its color. The color scale blends blue into yellow, where blue indicates a smaller and yellow a larger depth. The scale is always relative to all currently displayed nodes. For example, if you zoom into a particular area of the tree map, the scale will be re-adjusted so that that the depth of the parent node corresponds to blue. Below the tree map, a legend presents all possible colors as well as the displayed maximum and minimum depths.
Double-clicking on any colored rectangle in the tree map will zoom to the parent node unless the node is
already a top-level node. There are tool bar actions for for
In order to explore the hierarchical environment of a particular leaf in the tree map, there is a context action "Show In Tree", that switches to the tree view mode and selects the same node there. |
![]() | If enabled in the view settings, every node in the allocation call tree has a percentage bar whose length is proportional to the total number of allocations including all descendant nodes and whose light-red part indicates the percentage of allocations in the current node. |
![]() |
Every node in the allocation call tree has textual information attached that depends on the
allocation call tree settings and shows
The size and the allocation count are either cumulated for all calls below the associated node or not, depending on the corresponding cumulation view setting. Note that allocations performed in calls to filtered classes are consolidated in the first call into a filtered class. |
![]() |
If garbage collected objects are shown, you can reset the accumulated data
by clicking on the ![]() ![]() |
![]() | Only recorded objects will be displayed in the allocation call tree view. See the memory section overview for further details on allocation recording. |
![]() |
The View->Take heap snapshot for selection menu item and the
corresponding
![]() |
![]() ![]() |