Subsystems in dotTrace Timeline Viewer

Posted on by Alexey Totin

If you use dotTrace, you probably know it consists of two independent applications for performance analysis: Performance Viewer and Timeline Viewer. One of the greatest features that made Performance Viewer so helpful for quick performance evaluation was Subsystems. In dotTrace 2016.3, Subsystems have finally made it into dotTrace Timeline Viewer.

What are subsystems?

The mechanics of Subsystems are quite simple. In most cases, each subsystem just groups calls made within a certain namespace or assembly: WPF, LINQ, collections, strings, and so on. There are also certain special subsystems which are calculated based on other data (like ETW). These are garbage collection, file I/O, lock contention, and some others.

Subsystems in Timeline Viewer

Why would you care about subsystems when you profile?

The purpose of Subsystems is to quickly answer the main question “What the heck is going on in my app?”, along with more specific questions like “What causes the performance drop?” or “What allocates so much memory?” In dotTrace 2016.2 and earlier, you had to check different filters scattered around the UI to answer these questions. Now, the Subsystems filter is the single place* that shows you how time on the selected time interval is distributed among various activities.

*A group of filters previously known as Interval Filters is now also partly incorporated into Subsystems.

Quickly check what's going on in your app

 

UI freeze caused by user code

UI freeze caused by file operations

If you switch the Events filter to Memory Allocation, Subsystems will show you how much memory a particular subsystem allocates:

Memory allocation and subsystems

Subsystems are available not only as a filter but also as a bar in Call Stack | Methods and Subsystems. The bar shows exactly the same data as the Subsystems filter does. The reason for having it here is to visually evaluate the contribution of certain subsystems in a call subtree. If you enable Follow selection in call tree, the bar will show subsystems for the node currently selected in Call Tree.

Subsystems in call tree

Don’t forget that as everything in Timeline Viewer, Subsystems are able to work as a filter.
To turn on a filter by a certain subsystem, simply check the subsytem in Filters | Subsystems or click on it on the bar in Methods and Subsystems.

Filter by subsystem

Create your own subsystems

By default, all your code is calculated within the User Code subsystem. Of course this can be too vague in solutions containing multiple projects and/or using third-party frameworks. No worries! Subsystems are very flexible – you can create a new subsystem for any assembly, class or method you want to be shown separately in Subsystems.

For example, our app uses the Ionic zip library to handle zip files. We want to be able to quickly see how much time our application spends on zip processing. All we need to do is create a new subsystem that aggregates time spent in the Ionic assembly.

How to add your own subsystem

After you add the new subsystem, Subsystems will be instantly recalculated:

After adding a subsystem

As always, we suggest that you download ReSharper Ultimate and try subsystems in Timeline Viewer on your own!

Comments below can no longer be edited.

9 Responses to Subsystems in dotTrace Timeline Viewer

  1. Igor Skomorokh says:

    September 12, 2012

    Will those actions force profiled process to be restarted?

  2. jkovacs says:

    September 12, 2012

    @Igor – Attaching to a running process will not restart it. Attaching to a running process only works for .NET 4.0 and 4.5 applications due to limitations in the Profiler API. The list of available processes does not include .NET 3.5 and below for this reason. When you are done profiling, you have the option to detach from the process and leave it running or kill the process.

  3. EdwardB says:

    April 21, 2013

    How does this work in Shared hosting environments where RDP is not allowed?

    Thanks.

  4. Daria.Dovzhikova says:

    April 22, 2013

    @Edward to be able to profile remote applications you need to install dotTrace Profiler’s Remote Agent to the server with “run as administrator” permissions, and configure the port so you could access it. Can you tell a bit more about your environment?

  5. Gustin says:

    November 2, 2016

    Say I have a RESTful Web API in Azure cloud, hosted by an App Service.
    Do I understand it correctly: in this case it’s not possible to profile it with dotTrace?

  6. M G says:

    January 9, 2017

    I was profiling successfully for a while on a remote machine, when my local machine restarted unexpectedly. I can start the RemoteAgent on the remote machine, but I can’t attach to the process. Is there any way to recover or tap into that existing trace? Is there any way to force-cancel the old trace, so the entire computer doesn’t have to be restarted (as suggested by the error message)?

  7. Saurabh Agrawal says:

    April 18, 2017

    How can this be achieved using dottrace sdk? (Not using any of the licensed tools)? To quote the exact scenario, I am using the dottrace profiling sdk and would like to remotely manage the isactive flag using itrs tool (for the benefit of our support team). I then plan to build some sort of functionality to display the stats within itrs or cause itrs to open some other program to display the stats.
    The main question for this forum remains, how exactly can I manage the isactive flag remotely and collect the profiling data remotely?

  8. Tailor says:

    June 1, 2017

    Nice information, I was looking to perform an remote performance test. May I know why does the dot trace slow the the application on which performance trace has been performed? Thanks again

  9. Akanksha varshney says:

    February 5, 2018

    can we connect to linux remote server and perform remote debugging??

Subscribe

Subscribe to .NET Tools updates