dotTrace 2016.2 adds folding recursive calls in Timeline Viewer

Posted on by Alexey Totin

Although dotTrace 2016.2 mainly focuses on performance and bug fixes, it also gets one easy-to-miss yet important new feature, which has to do with how dotTrace Timeline Viewer shows recursive calls.

Recursive call stacks can be deep and difficult to analyze. Before 2016.2, Timeline Viewer showed call stack “as is”, i.e recursive calls were simply shown as they were called — one after another in the stack trace. Of course, on complex call stacks with multiple recursive calls this resulted in almost infinite stack scrolling. Now, dotTrace 2016.2 allows you to fold such calls to simplify stack analysis.

For example, let’s take a look at the call stack of a simple application that recursively copies files from a directory and its subdirectories, and reports the progress (the example below is shown for a directory with 3 subdirectories).

This is how it looked in dotTrace Timeline Viewer 2016.1:

Recursive calls in dotTrace Timeline Viewer 2016.1

And this is how the same stack looks in dotTrace Timeline Viewer 2016.2 when recursive calls are folded:

Folded recursive calls in dotTrace Timeline Viewer 2016.2

dotTrace recalculates the tree of recursive calls (it summarizes call times in all recursive subtrees) and presents the information by function signatures. Folded recursive calls are marked with the Folded call icon.

After you unfold a call (by clicking the Folded call icon), you get the familiar stack representation when all recursive calls are shown one after another as they were called. Unfolded recursive calls are marked with the Unfolded call icon:

Unfolded recursive calls in dotTrace Timeline Viewer 2016.2

Note that you don’t necessarily need to fold the entire recursive call tree. You can also fold/unfold any part of the recursive subtree:
Folded recursive subtree in dotTrace Timeline Viewer 2016.2

We hope you find this feature helpful and that it does help you simplify the analysis of complex call trees. To try it on your own, download ReSharper Ultimate 2016.2.

Comments below can no longer be edited.

3 Responses to dotTrace 2016.2 adds folding recursive calls in Timeline Viewer

  1. Kevin Gosse says:

    September 14, 2016

    Do you plan on adding some kind of scripting interface? DotTrace is an insanely powerful tool that helps me great deal in my job, but it’s sometimes frustrating not been able to extract reports from a traces (if I want to analyze the data in some way that wasn’t planned in the UI). A scripting interface (or any programmatic way to read the dump) would allow the tool to adapt to any unforeseen usecase.

    • Mike-EEE says:

      September 14, 2016

      Sounds like you are about to get introduced to YouTrack, Kevin. 🙂
      https://youtrack.jetbrains.com/issues

    • Alexey Totin says:

      September 14, 2016

      Hi Kevin,
      Could you please clarify what do you expect from such a scripting interface?
      Of course, the upcoming releases won’t have anything like that. But what 2016.3 will do have is a detailed log of ETW events – a list of all calls, HTTP, SQL events one after another in the order they happened. Thus, you can try to use this list for more complicated cases.

Subscribe

Subscribe to .NET Tools updates