Call Tree Analyses


  The call tree analyses views are created from the call tree view and show a static snapshot at the time when the analysis was made.

To create an analysis, select a call stack in the call tree view and select one of the call analysis actions from the tool bar or the view menu under the View->Analyze submenu.

A nested view will be created below the call tree view. If you invoke the same analysis action again, the analysis will be replaced. To see multiple analysis results at the same time, you can  pin the result view. In that case, the next analysis will create a new view. Unpinning an analysis closes the view.

Analyses are static, they are not auto-updated in live sessions. To re-calculate the analysis for the current data, use the  reload action. For the allocation analyses, this will calculate a new allocation tree, even if auto-updates are disabled.

  The following call tree analyses are available
  • Collapse recursions
    A recursion is detected when the same method was already called higher up in the call stack. In that case, the sub-tree is removed from the call tree and stitched back to the first invocation of that method. That node in the call tree is then prefixed with a label showing the number of recursions. Below that node, stacks from different depths are merged. The number of merged stacks is shown as a prefix on each node.

    Note that for a simple recursion, the number of merged stacks is the number of recursions plus one. So a node prefixed with "1 recursion" would contain a tree with nodes that are prefixed with "2 merged stacks".

    In more complex cases, recursions are nested and produce overlapping merged call trees, so that the number of merged stacks varies from stack depth to stack depth.

    At the point where a sub-tree is removed from the call tree to be merged higher up, a special  moved nodes placeholder is inserted.

    This analysis uses the same view settings as the call tree view

  • Calculate cumulated outgoing calls

    In the regular call tree, you can only see a method's outgoing calls for one particular call stack. If you are interested in the sum of all outgoing calls, regardless of how the method was invoked, the "Calculate cumulated outgoing calls" analysis solves this problem.

    For the selected method, all its top-level invocations, i.e. not considering recursive calls of that method, are cumulated and shown in the result tree. The header shows how many such top-level call sites were summed in that process.

    At the top of the view, there is a check box that allows you to collapse recursions in the result tree, similar to the "Collapse recursions" analysis.

    This analysis uses the same view settings as the call tree view

  • Calculate backtraces to selected method

    This analysis complements the "Calculate cumulated outgoing calls" analysis. Like the latter, it sums all top-level calls of the selected method without considering recursive calls. However, instead of showing outgoing calls, it shows the back traces that contribute to the invocations of the selected method. The call originates at the deepest node and progresses toward the selected method at the top.

    This analysis is similar to the hot spots view, only that by default it sums total times instead of self times for the selected method, and the hot spot view only shows methods whose self time is a significant fraction of the total time. At the top of the view there is a radio button group labeled "Time summation mode" that can be set to "Self times like in hot spot view". With that selection, the summed values for the selected method match that of the hot spots view.

    In the back traces, the invocation counts and times on the back trace nodes are only related to the selected method. They show how much the invocations along that particular call stack have contributed to the values of the selected method.

    Just like for the "Calculate cumulated outgoing calls" analysis, there is a check box at the top of the view to collapse recursions in the result tree.

    This analysis uses the same view settings as the hot spots view

  • Show classes

    This analysis is available in the allocation call tree and the allocation hot spots views, as well as all call tree analysis result views for allocations.

    The result view shows an instance table similar to the recorded objects view, just that it is restricted to the selected allocation spot.

  In the analysis result views that show call trees, the "Calculate cumulated outgoing calls" and the "Calculate backtraces to selected method" are available. Invoking them creates new top-level analyses with independent parameters. Any call tree removals from the analysis result view are not reflected in the new top-level analysis.

The "Show classes" action, on the other hand, does not create a new top-level analysis, but a nested analysis instead when used from call tree analysis result view.