Hi,
This is a more specific question to follow up on another question that I have asked recently. A correct answer for this question will earn a correct answer for that previous question too (since that is still in limbo)!
Basically I have a Java desktop application with a memory leak issue. I am using the memory profiler in Netbeans IDE to profile the memory issue. These are the steps that I have taken done so far:
- Attach a new memory profiler to the Netbeans project
- Define profiling points at several careful chosen lines of code, and set them to trigger a memory heap dump
- Run the application in profiling mode
The end result of this is that I have several memory dumps saved to disk in *.hprof
files. Netbeans IDE lets me peruse the contents (basic sort and search) of these memory dumps, and even lets me walk the heap, by seeing what the references contained within each instance, and what other objects reference each instance. That is all good, and I have been able to identify 1 or 2 fairly obvious memory leaks and rectify about 15% of the problem thus far.
However, right now the method I am using relies on creating hypotheses about which objects should NOT be in memory at a particular point of time, and then investigating those. What I am after now is a way to compare two separate heap dumps: Basically I have two heap dumps that should be almost the same, because the application has been restored to the same state.
However, one is before the memory leak, and the other after the memory leak, and so they are obviously different. If I am able to compare these two heaps using a of tool, instead of manually as I am doing now, then I need not rely on hypotheses to identify where the leaks are occuring, and can just have the tool identify them for me.
This is important for me because of the the sheer number of classes and instances involved for this particular application (700+ and millions, repsectively)
Is the Netbeans IDE's profiler capable of doing this?
If not, is there a tool out there that is able to perform this task?
Thank you!