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 J2EE components and displays the relevant nodes in the call tree with special icons that depend on the J2EE component type:

 servlets
 JSPs
 EJBs

For JSPs and EJBs, JProfiler shows a display name:
  • JSPs
    the path of the JSP source file
  • EJBs
    the name of the EJB interface

If URL splitting is enabled, each request URL creates a new node with a  special icon and the prefix URL:, followed by the part of the request URL on which the call tree was split. Note that URL nodes group request by the displayed URL.

You can disable both J2EE 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 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 J2EE component methods have their own icon (see above) and display name, the real class name is appended in square brackets.
  • classes
    Every node in the tree is a single class. J2EE 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.
  • J2EE components
    Every node in the tree is a J2EE 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

  • unfiltered classes
    Classes which are unfiltered according to your configured filter sets are used for the construction of the call tree.
  • first level calls into unfiltered classes
    Every call into a filtered class that originates from an unfiltered class is used for the construction of the call tree. Further calls into filtered 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 Runnable.run() 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 inherent 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 10 levels from the main window's menu or choose the corresponding menu item from the context menu. 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.
  Nodes in the 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 Show Hidden action. Invoking this action will bring up a dialog where you can select hidden elements to be shown again.

  If enabled in the view settings, every node in the call tree has a percentage 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 inherent 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 inherent time measurement in ms or µs. This is the inherent time that does not include calls into unfiltered classes.
  • 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.
    • J2EE components
      the display name of the J2EE 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. 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.
  You can stop and restart CPU data acquisition to clear the call tree and freeze all views to ensure that the call tree remains static.