How do I compare memory heap dumps in Netbeans?
What I have done is to configure my project to use profiling, then added several profiling points at chosen lines of code (similar to setting breakpoints). These profiling points trigger a "snapshot", which creates a memory dump.
As my application is running, the profiling tab lists each of the profiling points, and marks the number of hits it has encounteed, providing a link to open a report for that profiling point. In addition, the profiler control panel adds the new snapshots to a list.
If I open these reports and follow the links, or open the snapshots from the control panel, in both cases, Netbeans opens a snapshot tab with Summary
, Classes
, Instances
and OQL
subscreens.
If I select one of them from the Profiler control panel, and press save, the file gets saved in HPROF
format.
If I select the menu Profile --> Compare Memory Snapshots
, it only allows me to select NPS
format files, of which I cannot obtain any.
I believe Compare Memory Snapshots sounds like it should be able to compare heap dumps, but I cannot figure out how to do it.
Questions
Where is Netbeans putting the NPS files (if it is indeed creating them)? If not how do I get Netbeans to create NPS files triggered from profiling points?
Is there a way to get Netbeans to compare HPROF files, since that is the memory heap dump after all?
Or am I simply completely overlooking something altogether?
Thanks!
Background
Using Netbeans 6.7.1
.
I am doing memory profiling for a really large & complex application that has a memory leak problem. I have managed to solve large chunks of the leaks using a combination of Netbeans profiler & JHAT (command line util that comes with JDK). It s the remaining stragglers that I need a more powerful heap analysis capabilities for - the hypothesis-first approach that worked previously is becoming decreasingly effective.
This question s really specific, for more background see a question I have asked previously.