Call Graph


  The call graph shows a statically calculated thread resolved call graph for selected nodes. The nodes are methods, classes, packages, or Java EE components, depending on the selected aggregation level.

To calculate a call graph, click  Generate graph in the tool bar or select View->Generate Graph from JProfiler's main menu. If a graph has been calculated, the context menu also provides access to this action.

Before a graph is calculated, the call graph wizard is brought up. The resulting graph is static and can be re-calculated be executing  Generate graph again. The call graph wizard remembers your last selection.

  The call graph has the following properties:
  • Nodes are painted as rectangles. The rectangle includes information about
    • The node name (method name, class name, package name or or Java EE component name). For methods, no parameters are displayed. In order to see the parameters of a method, switch on signature tooltips in the call graph view settings or select the corresponding check item in the context menu.

      Package names are shortened by default with only the last package name shown in full. For example, com.mycorp.myapp.mypackage becomes c.m.m.mypackage. You can disable package shortening in the view settings.

    • The total time (including outgoing calls)
    • The self time (excluding outgoing calls)
    • The number of calls into this node
  • The node rectangles have a background coloring which - depending on the call graph view settings is taken from a gray to red scale for increasing
    • self time
    • or total time

    The percentage base is

    • the time spent in the displayed nodes only
    • or the time spent in all nodes
  • Calls are painted as arrows, the arrowhead points from the caller toward the callee. If you move the mouse over the call arrow, a tooltip window will be displayed that shows details for the particular call.
  • Call arrows have a color which is taken from a black to red scale for an increasing percentage in execution time. In this way you can spot the most important calls of a node without checking their tooltips one by one.
By default, the call graph only shows the direct incoming and outgoing calls of the initially selected nodes. You can expand the graph by double clicking on any node. This will expand the direct incoming and outgoing calls for that node. Selective actions for expanding the graph are available in the toolbar, the View menu and the context menu:
  •  Show calling nodes
  •  Show called nodes
  •  Add nodes to graph, to add other unrelated nodes to the graph. The node selection dialog will then be displayed.

If applicable, an node has plus signs at the left and the right side to show or hide calling and called nodes. The controls at the left side are for calling, the controls at the right side for called nodes. The plus signs have the same effect as the  Show calling nodes and the  Show called nodes actions. Additionally, the plus signs give you the indication that there might be nodes to display and that you have not yet tried to expand them.

The first time the outgoing calls of a node are expanded, only calls above the threshold that is configured in the view settings are displayed. If there still are outgoing calls below below the threshold, a  shaded icon is shown on the right side. If you expand again, all outgoing calls are displayed.

You can hide nodes by selecting them and pressing the delete key. You can select multiple nodes and delete them together. Alternatively, you can select the  remove nodes from graph action from the graph toolbar or the context menu.

If you delete methods, the call graph may contain a number of unconnected branches. To clean up the graph, select a method on the branch that should be retained and select the  cleanup unconnected methods action from the graph toolbar or the context menu. The "remove all but selected nodes" action in the context method allows you to trim the graph to a few selected nodes.

Any modification to the call graph can be reverted with the  undo action. If you open a large number of calls and want to track back to a previous state of the graph, hit this button repeatedly. If you hit undo too may times, a  redo action is also available. Consecutive undo/redo is useful for replaying what happens to the graph when expanding a node.

The call graph offers a number of navigation and zoom options.

  The call graph 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.

The data is taken from the currently displayed graph and not from the live call tree view, so the displayed time always shows the time when the graph was calculated. Because the graph handles bridge methods and interface method calls specially in order to avoid "bottleneck" nodes in the graph, the call trees displayed by the analyses can be somewhat different from the corresponding analyses in the call tree view.