dotTrace Call Tree: Smart Navigation
Usually, when profiling applications, you have to analyze the call tree. This part of the job is the most tedious: digging through the endless sequences of nodes distracts you from focusing on real problem areas. With dotTrace smart navigation, this task becomes much easier. Let’s see how it works, using the sample application that comes bundled with dotTrace.
In order to investigate the application’s behavior and spot potential candidates for optimization you usually navigate the call tree with a mouse or arrow keys.
You are presented with the data on relative and exact timings as well as number of calls to particular methods. Percentage of time consumed by the method in relation to the thread’s root can be used here as a bottleneck signal. With the help of these concise but precise data we can find out who is the major time consumer in our case: the SetClip method.
As you can see, some calls are marked gray and sort of dimmed out in the GUI. Those are calls to filtered methods. By default, only system calls are filtered (Microsoft.*, System.*). However, dotTrace lets you apply any number of custom filters (View | Filters | Manage Filters… or Ctrl+Alt+F). This can be very helpful if you have little or no interest in investigating behavior of some functions (perhaps, because they can’t really be optimized).
To exclude filtered items completely from navigation process there is a pair of commands in the View menu which are also available through shortcuts: To Next/Previous Unfiltered Node (Ctrl+Right/Ctrl+Left) bypasses all filtered calls in the process of navigation.
Another pair of commands is To Next/Previous Important Node (Shift+Ctrl+Right/Shift+Ctrl+Left). It offers you the possibility to get from the initial ‘grouped by thread’ state right to the next method which can be of interest from practical perspective. The view becomes completely unfolded with the necessary item highlighted. All that can be done with the help of a single menu command or a handy shortcut:
When performing navigation between important nodes dotTrace goes down the call tree until it finds a node having two or more child nodes, each of which consumes at least 10 percent of the overall runtime. Selected becomes the child, which consumed the largest amount of time in comparison to other children.
Navigation between important nodes can be a tremendous timesaver, indeed!
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…