dotTrace 2024.2 Help

Fold Calls

The Call Tree can be simplified by folding groups of calls meaningless to analysis. Namely, chains of system function calls and recursive calls.

Fold system calls

System calls are calls of non-user code, for example, calls to methods from System and Microsoft namespaces. Normally, these calls are filtered out and are shown in Call Tree in gray font. Use folding to hide chains of system calls:

  • System call chains that can be folded are marked with the Unfolded chain icon.

  • Folded call chains are marked with the Folded chain icon.

  • Note that you can mark user assemblies as system ones.

To fold a chain of system calls

  1. Select a desired call chain that contains system calls.

  2. Click Unfolded chain or press Ctrl+Space to fold the calls.

To unfold a chain of system calls

  1. Select a desired call chain that contains system calls.

  2. Click Folded chain or press Ctrl+Space to unfold the calls.

Example

Call Tree example

For instance, if in the example above folding is configured so that all system calls must be folded, Call Tree will look as follows:

UserMethod1
      | UserMethod2
      |      | SystemMethod2
      | Folded chainSystemMethod1
         | UserMethod1
         | UserMethod2
            | SystemMethod1

Fold recursive calls

Recursive call stacks can be deep and difficult to analyze. Thus, complex call stacks with multiple recursive calls require almost infinite stack scrolling. To simplify the analysis of such call stacks, you can fold recursive calls. When a chain of recursive calls is folded, dotTrace recalculates this call tree (it summarizes call times of a particular method in all recursive subtrees) and presents information by method signatures:

  • Recursive calls are marked with the Recursive calls icon.

  • Folded recursive calls are marked with the Recursive calls icon.

To fold a recursive call

  1. Select a recursive function call in Call Tree.

  2. Click Recursive calls to fold the function call.

To unfold a recursive call

  1. Select a recursive function call in Call Tree.

  2. Click Recursive calls to unfold the function call.

Example

Consider an example for better understanding of how dotTrace Viewer calculates call times when recursive calls are folded.

Call Tree example

If in the example above you fold recursive calls starting from the call A UserMethod1, Call Tree will look like follows (each letter stands for a call own time).

Recursive callsUserMethod1 A + B + C + D + E + F + G + H + I
      | UserMethod2 E + G
      |      | SystemMethod1 G
      | SystemMethod1 C + H
      | SystemMethod2 I

Last modified: 26 May 2024