dotTrace 2016.1 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:

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

Scoping to Particular Method Calls

To simplify analysis of a certain execution path, you can limit the Call Tree scope to a particular method call.

To scope to a particular method call:

  1. Select a method in Call Tree.
  2. Press Ctrl+Enter or choose the Scope to This 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 occurrence. See details about filtering next in this section.

For instance, if in the example above (see the picture) you decide to scope to 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 occurrences within one page.

To merge and show all method calls occurrences:

  1. Select a method in Call Tree.
  2. Press Ctrl+Shift+Enter or choose the Merge Method Occurrences item from the context menu.

After this, the selected method becomes the root node in Call Tree containing all the occurrences. All other calls are hidden. This also automatically applies a filter by the method occurrences and their subtrees.

For instance, if in the example above (see the picture) you decide to see 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 occurrence, 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 scope to a particular method occurrence or merged method occurrences, Call Tree works as a filter by method occurrence(s).

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

See Also

Reference:

Last modified: 19 August 2016