Call Tree View

The call tree view shows a thread resolved top-down call tree which is shows method detail according to the configured filters.
  JProfiler automatically detects Java EE components and displays the relevant nodes in the call tree with special icons that depend on the Java EE component type:


For certain classes, JProfiler shows a display name:
  • JSPs
    the path of the JSP source file
  • EJBs
    the name of the EJB interface
  • RMI proxies
    the name of the remote interface
  • Web service proxies
    the QName of the end point
If HTTP splitting is enabled in the servlet probe each request URL creates a new node with a  special icon and the prefix HTTP:, followed by the part of the request URL on which the call tree was split. Note that HTTP nodes group request by the displayed URL.
  The call tree view has an aggregation level selector. It allows you to switch between
  • methods
    Every node in the tree is a method call. This is the default aggregation level. Special Java EE component methods have their own icon (see above) and display name, the real class name is appended in square brackets.

    For methods that have been configured for exceptional method run recording, different icons will be shown. Please see the help on exceptional method run recording for more information.

  • classes
    Every node in the tree is a single class. Java EE component classes have their own icon (see above) and display name, the real class name is appended in square brackets.
  • packages
    Every node in the tree is a single package. Sub-packages are not included.
  • Java EE components
    Every node in the tree is a Java EE component. If the component has a separate display name, the real class names are omitted.
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 call tree is chosen.

The call tree doesn't display all method calls in the JVM, it only displays

  • profiled classes
    Classes which are profiled according to your configured filter sets are used for the construction of the call tree.
  • first level calls into unprofiled classes
    Every call into a filtered class that originates from a profiled class is used for the construction of the call tree. Further calls into unprofiled classes are not resolved. This means that a filtered node can include information from other filtered calls. Filtered nodes are painted with a red marker in the top left corner.
  • thread entry methods
    The methods and the main method are always displayed, regardless of the filter settings.

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 call tree view this is the case if the self time of the current node is below the defined threshold, but there are descendant nodes that are above the threshold.

  When navigating through the 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 call tree, select a method and choose View->Expand Multiple Levels from the main window's menu or choose the corresponding menu item from the context menu. A dialog is shown where you can adjust the number of levels (20 by default) and the threshold in per mille of the parent node's value that determines which child nodes are expanded.

If you want to collapse an opened part of the call tree, select the topmost method that should remain visible and choose View->Collapse All from the main window's menu or the context menu.

  If a method node is selected, the context menu allows you to quickly add a method trigger for the selected method with the  add method trigger action. A dialog will be displayed where you can choose whether to add the method interception to an existing method trigger or whether to create a new method trigger.

You can use this view as a starting point for determining which methods are candidates for exceptional method run recording. Once you have identified methods of interest, you can right-click them in the table and choose  Add As Exceptional Method from the context menu.

  Nodes in the call tree can be removed together with their sub-trees by selecting them and hitting the DEL key or by choosing Remove Selected Sub-Tree from the context menu. Times in ancestor nodes will be corrected accordingly as if the hidden nodes did not exist.

There are two removal modes:

  • All invocations
    All invocations of the selected method in this view together with their entire sub-trees will be removed.
  • Sub-tree only
    Only the selected sub-tree will be removed, other invocations of the same method will remain untouched.

The selection of removed nodes influences the hot spots view. In this way, you can check what the hot spots would be if those methods were optimized to the point of not being important contributions.

When you remove a node, the header area will show a line with the count of the removed nodes and a  [Restore Remove Sub-Trees] button. Clicking on this button will bring up a dialog where you can select removed elements to be shown again.

  For method, class or package nodes, the context menu and the View menu have an Add Filter From Selection entry. The sub-menu contains actions to add appropriate filters as well as an action to add an ignored method entry.

If a node is excluded, you will get options to add a profiled package, otherwise you will get options to add a compact or ignored filter. These actions are not available for classes in the "java." packages.

  The tree map selector above the 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 help on tree maps for more information.
  If enabled in the view settings, every node in the call tree has a size bar whose length is proportional to the total time spent in the current node including all descendant nodes and whose light-red part indicates the percentage of the self time of the current node.
  Every entry in the call tree has textual information attached which depends on the call tree view settings and shows
  • a percentage number which is calculated with respect to either the root of the tree or the calling node.
  • a total time measurement in ms or µs. This is the total time that includes calls into other nodes.
  • an self time measurement in ms or µs. This is the self time that does not include outgoing calls.
  • an invocation count which shows how often the node has been invoked on this path.
  • a name which depends on the aggregation level:
    • methods
      a method name that is either fully qualified or relative with respect to to the calling method.
    • classes
      a class name.
    • packages
      a package name.
    • Java EE components
      the display name of the Java EE component.
  • a line number which is only displayed if
    • the aggregation level is set to "methods"
    • line number resolution has been enabled in the profiling settings
    • the calling class is unfiltered

    Note that the line number shows the line number of the invocation and not of the method itself.

  You can set change the root of the call tree to any node by selecting that node and choosing View->Set As Root from the main window's menu or by choosing the corresponding menu item from the context menu. Percentages will now be calculated with respect to the new root if the percentage base has been set to "total thread time" in the view settings dialog.

After setting a call tree root, information about the selected root is shown at the top of the view. A single scrollable label shows the last few stack elements leading up to the root and a detail dialog with the entire stack of the call tree root can be displayed by clicking on the "Show more" button.

When you change the root, the hot spots view will show hot spots only for the selected root. At the top of the hot spot view, you will see the same information on the currently set root as in the call tree view to remind of you the context of the displayed data. Invoking the "Show graph" action in either the call tree or hot spot view will show a graph that is limited to the same call tree root - again at the top of the graph the information on the selected root is displayed. When creating a new graph in the graph view itself, a check box in the wizard lets you apply the currently selected root or analyze the entire call tree.

To return to the full view of all nodes called in the current thread or thread group, select View->Show All from the main window's menu or the context menu or click on the  remove button in the root display at the top of the view.

  The call tree offers several analyses that produce static snapshots with calculated information related to the selected method. The results are shown in nested views and are replaced whenever a particular type of analysis is repeated.
  You can stop and restart CPU data acquisition to clear the call tree.