Archive for September, 2006

How to find which objects take up the most memory?

Friday, September 22nd, 2006

Memory profiling is the newest thing about dotTrace Profiler 2.0 (currently released as a beta). You are invited to explore this useful feature by reading our simple answer to one simple question: Which objects allocated by my application take up the most memory?

Here’s how you can find out:

  • Open dotTrace and on the Welcome screen click Profile Application (or Windows Service or Web Application as appropriate).
  • Specify the path to your application, the Windows service you want to profile, or the starting URL of your web application. Select Memory profiling and click Start application.

    Select Memory Profiling
  • The application started, and the following dialog window is displayed:

    This dialog is used to start and stop profiling

    Now, have your application exhibit the behavior you want to profile: perform some calculations, open some files, or what have you. Then, at the moment when the application is using the most memory, click Dump Memory in the dialog above to get the current snapshot of the application’s memory.
  • The memory snapshot (click the thumbnail below) is generated and opened for your review. You can see the default tab - Roots - and the default view - Class List. This should be enough to get the first idea of what is going on with objects currently allocated in memory.

    Click here to see the full screenshot
  • The list is sorted by the Memory column. The classes of objects that take up the most memory appear at the top of the list. In addition, the rightmost column, Held Memory, displays the amount of memory each class of objects holds, that is, all the memory consumed by objects which are referenced exclusively by a given class. For example, if you were to delete all objects of System.Reflection.RuntimePropertyInfo[] (highlighted on the full screenshot), you would free up not only the 4,156 bytes (1.79% of all memory) they consume by themselves, but also the 53,078 held bytes (~23%) of all memory.
  • Also, you can see the namespaces whose classes consume the most memory. Just switch to Namespace Tree view. The classes and objects are grouped by namespace, each of which you can browse and analyze.

    Namespace Tree view



It’s your application, so you decide what matters more. dotTrace gives you the tools to do it.

Technorati tags: , , ,

JetBrains dotTrace 2.0 Beta Released

Thursday, September 14th, 2006

We’re nearly ready with the second major release of our intelligent profiling tool, JetBrains dotTrace 2.0. We have just released a public beta version which you can download and try out here: http://www.jetbrains.com/profiler/beta.html. The download includes a full-functionality license that will allow you to use the software until October 31, 2006.

The most important new feature in dotTrace 2.0 beta is Memory Profiling. Now you can see what happens with the memory used by your .NET applications to optimize how your app uses memory. You can capture snapshots of memory to analyze in nine informative views, each tuned to a specific aspect of memory usage. You can also take a snapshot of the application’s memory state at two key points to compare them and locate memory leaks.

Notable enhancements in performance profiling include "Quick Info" for any function, the ability to compare performance snapshots of the same application, and new filtering options. Among other useful features and improvements are the integration with Microsoft Visual Studio and the ability to profile Windows services.

Information on new features is available at http://www.jetbrains.com/profiler/features/newfeatures.html.

We think you’ll find that dotTrace 2.0 is now a comprehensive and robust profiling solution for .NET applications that stands up to the most demanding profiling requirements. Give it a try and let us know what you think!

- The JetBrains .NET Development Team

Technorati tags: , ,