dotMemory 4.0 EAP: .NET Memory Profiler Resuscitation
Do you know that JetBrains provides a .NET memory profiler? You have a good excuse for not knowing this, as the profiler hasn’t seen a single update since 2010.
That is, until today.
Today we’re excited (and by this we mean really excited) to announce the availability of dotMemory 4.0 EAP, providing a brand new .NET memory profiling experience. Download early builds of dotMemory 4.0 and try ’em out!
dotMemory? Why not dotTrace Memory?
There’s a product currently available that is called dotTrace Memory 3.5, and also a performance profiler called dotTrace Performance, with the names being artifacts of splitting a formerly integrated profiler into separate memory and performance profilers several years ago.
The two profilers have since diverged. In addition, the word “dotTrace” is very loosely related to memory profiling. So we felt it was appropriate to rename the profilers. The new version of the memory profiler is going to be called dotMemory (as opposed to dotTrace Memory), while further versions of the performance profiler will be referred to as simply dotTrace (as opposed to dotTrace Performance). Until dotMemory 4.0 is released to market, both names (“dotMemory” and “dotTrace Memory”) can be used interchangeably.
Enough talking, what’s inside the profiler?
Inspired by many popular television series, we wanted dotMemory 4.0 to feel like a tool that can help with .NET memory crime scene investigations. It lets us collect data (using one or more snapshots), choose a number of suspects (that are potentially causing the issue) and follow clues until we find who’s guilty.
After deciding on being the good cop or the bad cop, we can use dotMemory to provide answers to questions like:
- Why is a specific object still in memory? What causes the memory leak?
- What is taking so much memory?
- How does garbage collection affect the performance of my application (e.g. high memory traffic)?
Let’s have a quick look at dotMemory 4.0 EAP. Do note it’s still EAP so things may change!
Starting memory profiling
After starting dotMemory, we can choose to profile a wide variety of .NET applications. There is support for standalone .NET applications, Windows Store applications, Silverlight, web applications and much more. Note that a profiling session can also be started from within Visual Studio on the project(s) that are currently open.
Exploring memory usage
After taking one or several snapshots of the application, we get to see a number of things. We can see memory usage on the different memory heaps available in .NET.
We can see the various snapshots taken during execution, and drill down into one of them or compare different snapshots. Once we open a snapshot we get a visual representation of our application’s memory usage; then we can dive into our code based on the amount of memory a given type used, based on memory fragmentation or based on dominators, objects that keep other objects in memory. We also get some common leaks shown, such as event handlers that are not being cleaned in our code.
dotMemory lets us explore further and look at objects that are being held in memory and view their dominators, instances, heap generation information and so on. With every investigative step, the left-hand navigation bar shows us exactly what we were looking at before and allows us to navigate back and forth between steps.
Give it a try!
By the way, we already have some documentation available for you, including an overview of .NET memory management:
- Getting Started with dotMemory
- Find a Memory Leak with dotMemory
- How to Optimize Memory Traffic with dotMemory
- dotMemory Manual
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…