dotTrace Web Help

Call Tree

Call Tree shows method execution paths. Each method node in the tree represents a top-level method executed by a certain thread. The method node lists methods it called and metrics collected during profiling.

Use Call Tree to:

  • Get a quick overview on application activity.
  • Examine execution path of slowest methods (the ones that consume most time or are called frequently).
  • Determine critical execution paths.
  • Apply filter by method to limit other filters with time intervals where only the method you are interested in was executed.

To simplify call stack analysis, Call Tree offers the following functionality:

What Call Tree Shows

call_tree_0

pos_1 The percentage of time spent in a call relative to the total selected time.

pos_2 Short method name.

pos_3 Total time spent in a call and its subtree. See details below.

pos_4 Full method name.

How Call Time Is Calculated

For better understanding how Call Tree calculates time, consider the example.

tv_plain_list_2

Call Tree will calculate time as follows:

UserMethod1 = A + B + C + D + E + F + G + H + I
   |UserMethod2 = B + D
   |   |SystemMethod2 = D
   |SystemMethod1 = C + E + F + G + H + I
      |SystemMethod2 = E
      |SystemMethod1 = F + H
      |   |UserMethod1 = H
      |UserMethod2 = G + I
         |SystemMethod1 = I

Focusing on Method Calls

To simplify analysis of a certain execution path, you can focus on a particular method call by opening it separately.

To open a particular method call:

  1. Select a method in Call Tree.
  2. Press the Enter key or choose the Open Current Method Instance item from the context menu.

After you open a particular method call, it becomes a root node in Call Tree. All other calls except the subtree of the selected node are hidden. This also automatically applies a filter by the selected method instance. See details about filtering next in this section.

For instance, if in the example above (see the picture) you decide to open the UserMethod2 call (marked as B), Call Tree will look like and calculate time as follows:

UserMethod2 = B + D
   |SystemMethod2 = D

If a method was called from a number of places, you can merge all method call instances within one page.

To open all method calls merged:

  1. Select a method in Call Tree.
  2. Press the Ctrl+Shift+Enter shortcut or choose the Open All Method Instances Merged item from the context menu.

After you open merged method instances, they become the root nodes in Call Tree. All other calls except the subtrees of the selected nodes are hidden. This also automatically applies a filter by the method instances.

For instance, if in the example above (see the picture) you decide to open all UserMethod2 calls merged, Call Tree will look like and calculate time as follows:

UserMethod2 = B + D + G + I
   |SystemMethod2 = D
   |SystemMethod1 = I

To return back to the previous call tree root, click the back button at the top or use the Go Back context menu item.

Back Traces View Mode

When Call Tree is focused on a method instance(s) or displays search results, you can switch Call Tree to the Back Traces mode using the controls at the top of Call Tree.

In the Back Traces mode you can see which functions called a particular function from the bottom up. In other words, Back Traces is the inverted Call Tree view.

For instance, if in the example above (see the picture) you decide to open the UserMethod2 call (marked as B), Call Tree will show you methods called by UserMethod2:

UserMethod2
   |SystemMethod2

If you switch Call Tree to the Back Traces mode, it will show you the execution path that ended with calling UserMethod2 or, in other words, the upper part of the tree:

UserMethod2
   |UserMethod1

How Call Tree Works as a Filter

When you focus on a particular method instance or merged method instances, Call Tree works as a filter by method instance(s).

After the filter by method instance(s), other filters will show data only for the time intervals where the selected method instance(s) (including subtree) was executed.

See Also

Reference:

Last modified: 5 December 2014
comments powered by Disqus