dotTrace 2016.2 Help

Call Stack

The call stack data are shown in the Performance Profiler window using two filters:

  • Top Methods
  • Call Tree

Both filters are almost identical to the corresponding filters in Timeline Viewer. Therefore, if you need more information on how a particular filter works, refer to the corresponding section of the Analyzing Timeline Profiling Results | Call Stack chapter. The section you are currently reading provides brief details on the filters and on how they differ from the corresponding filters in the standalone Timeline Viewer. In a nutshell, the main difference you should take into account is that unlike standalone Timeline Viewer, Top Methods and Call Tree in Visual Studio allow navigating to particular method declaration. Also, for this reason, shortcuts work a little bit different in Performance Profiler. Note that navigation to the source code is possible only if ReSharper or ReSharper Ultimate is installed in Visual Studio.

Top Methods

Top Methods is the list of top five methods from all selected methods sorted by execution time. This time includes the own time of a user method and own time of system methods it called (down to the next user method in the stack). If there are no user methods on the selected time interval, the list will show system methods executed on this interval.

For more details on the filter, refer to the corresponding section related to the standalone Timeline Viewer.

To navigate to a method declaration in the source code:

  1. Select a method in Top Methods.
  2. Press Enter or choose the Navigate to Code item in the context menu.

To show all method occurrences in Call Tree and apply a corresponding filter:

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

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

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 the execution time of the underlying call subtree. If Call Tree is focused on a particular method, you can switch the view to Back Traces. In this mode, the call tree is inverted and you can track the execution path up to the first method in the stack.

For more details on the filter, refer to the corresponding section related to the standalone Timeline Viewer.

To navigate to a method declaration in the source code:

  1. Select a method in Call Tree.
  2. Press Enter or choose the Navigate to Code item in the context menu.

To navigate from a method declaration in the source code to Call Tree and apply a filter by all method occurrences:

  • In the source code in Visual Studio, do one of the following:
    • Right-click on the method name and in the context menu, select Navigate To | Locate in Performance Snapshot.
    • Place the cursor on the method name or anywhere inside the method and press Shift+Alt+S.
      Known issue in dotTrace 10.0.2: After installing dotTrace, the shortcut does not work until you reapply ReSharper's current keyboard scheme. To do this, in ReSharper | Options… | Environment | Keyboard & Menus , click the Apply Scheme button.
    This also applies a filter by method occurrences and their subtrees.

To scope to a particular method:

  1. Select a method in Call Tree.
  2. Press Ctrl+Enter or choose the Scope to This item in the context menu.

After this, the selected method occurrence becomes a root node in Call Tree. This also applies a filter by this method occurrence and its subtree.

To show all method occurrences:

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

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

To find a method by name in Call Tree:

  1. Click the ThemedIcon.CallTreeSearch.Screen.[Gray] Find method in Call Tree button.
  2. Start typing characters in the text box. As you type, the lookup list narrows down, suggesting names that match the entered substring. Note that you can use CamelCase notation. It is case-insensitive, so there is no difference between 'gtc' and 'GTC'.
  3. Select a class or a method from the list and press Enter.

The found method becomes a root node containing call subtrees of all its occurrences. This also applies a filter by method occurrences and their subtrees.

Last modified: 15 December 2016