dotTrace 2017.3 Help

Methods and Subsystems

Methods and Subsystems shows the list of methods from all selected threads sorted by execution time.

Use Methods and Subsystems in conjunction with other filters to determine "top" methods by a certain condition. For example, to see "top" methods by file operations time, select the File Operations event in Events.

top methods 1

pos 1 The percentage of call execution time (total or own depending on the selected sorting) relative to the total selected time. If Follow selection in Call Tree is enabled, then relative to the total time of the call subtree selected in Call Tree.

pos 2 Short method name.

pos 3 Total / Own + System or Total / Own call execution time. See the details on how this time is calculated below.

pos 4 Full method name.

Follow selection in Call Tree
If this option is enabled, methods and subsystems are calculated for the node that is currently selected in Call Tree. Otherwise, methods and subsystems are calculated for the currently selected time intervals.

Hide system functions
See the details on this option below.

Subsystems
Subsystems allow you to quickly understand how the call time is distributed among various components: user and system code, WPF, LINQ, and others. The subsystems bar in Methods and Subsystems visualizes the data from the Subsystems filter.

How Call Time Is Calculated

If Hide system functions is enabled, Total call time is calculated as a sum of method's own time and time of all child calls.
Own + System time is calculated as a sum of method's own time and the time of all child system methods (down to the next user method in the stack).

If Hide system functions is disabled, system methods are shown in the list separately. In this case, method's Own time does not include the time of child system calls.

For better understanding, consider the example.

tv plain list 2

If Hide system functions is enabled, Methods and Subsystems calculates time (Total / Own + System) as follows:

UserMethod1 = A + B + D + C + E + F + G + H + I / A + C + E + F + H
UserMethod2 = B + D + G + I / B + D + G + I

If Hide system functions is disabled, Methods and Subsystems calculates time (Total / Own) as follows:

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

Working with Methods and Subsystems

To navigate to a method declaration in the source code:

  1. Select the method.
  2. Press Enter or choose the Navigate to Code (Timeline Viewer integrated in Visual Studio) or Show Code (standalone Timeline Viewer) item in the context menu.

To show all method occurrences in Call Tree and apply a filter by method's total time:

  1. Select a method.
  2. Press Ctrl+Shift+Enter, click on the method's total time link or choose the Merge Method Occurrences item in the context menu.

After this, the method becomes a root node in Call Tree containing call subtrees of all its occurrences. This also applies a filter by method occurrences and their subtrees.

To show all method occurrences in Call Tree and apply a filter by method's own time:

  1. Select a method.
  2. Click on the method's own time link or choose the Filter by method's own time item in the context menu.

After this, the method becomes a root node in Call Tree and a filter by method's own time is applied. Note that all child calls are excluded from the subtree in this case.

Sometimes, it may be helpful to quickly view backtraces (an inverted call tree) of a particular method to identify its origin.

To quickly view backtraces of a particular method:

  1. Hover the mouse over the method.
  2. Click the arrow symbol async calls arrow on the left.

backtraces top methods

To sort the list by total or own time:

  • Click on the Total / Own time link on the top of the Methods and Subsystems window.
Last modified: 13 December 2017