Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » comparing heap dumps?
comparing heap dumps? [message #629020] Sun, 26 September 2010 07:46 Go to next message
Benedikt Heinen is currently offline Benedikt HeinenFriend
Messages: 1
Registered: July 2009
Junior Member
I've got a memory leak in a 'long-running' app, which does retain a lot of data.

Looking at the data itself is very difficult, given the amount of data present. Is there a way to (automatically) compare two heap dumps and get a report / overview / histogram / ... that will show by how much objects have grown, what objects are new, what objects were garbage collected?
Re: comparing heap dumps? [message #629199 is a reply to message #629020] Mon, 27 September 2010 13:25 Go to previous message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 161
Registered: July 2009
Senior Member
Comparing is a difficult topic when it comes to heap dumps. In short, the problem is that heap dumps are just snapshots in which the objects do not have a stable identifier.

May be the following blog can help you understand better the limitations, but will not help you solve your problem:
http://dev.eclipse.org/blogs/memoryanalyzer/2010/01/25/heap- dump-analysis-with-memory-analyzer-part-1-heap-dumps/

To be more precise - I am talking about heap dumps which one can get from the VM without using a profiler. Certain profilers do tag the objects, capture allocation stacks, count which objects are GCed, etc...
Memory Analyzer just analyzes heap dumps and such questions about the objects' dynamics are difficult to answer. It offers the possibility to compare the class histograms of two heap dumps, or (since 1.0) also the possibility to compare the retained sets of two or more objectct sets (on class level). For the latter see the New & Noteworthy document for MAT 1.0 - http://www.eclipse.org/mat/1.0/noteworthy.html.

But I think that even without the possibility to recognize new objects and without using some special comparison features, one can still get some hints by analyzing the heap dumps.

What may be help, for example, is to look with Memory Analyzer at the dominator tree and inspect the biggest object(s) there. Find how much it (they) have grown, expand the tree to find an accumulation point and see what it references, look at the paths from the GC roots to the accumulation point, etc... Do this for more than one heap dumps (manually) and see if you get some better idea about the problem.
One blog that may be helpful is:
http://dev.eclipse.org/blogs/memoryanalyzer/2008/05/27/autom ated-heap-dump-analysis-finding-memory-leaks-with-one-click/

Let me know if this helps.

Krum
Previous Topic:memory allocation problem
Next Topic:Immediate Dominators return <ROOT> class name
Goto Forum:
  


Current Time: Tue Sep 18 21:29:18 GMT 2018

Powered by FUDForum. Page generated in 0.01316 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top