Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] Memory usage of TmfExperiment

Hi Francis,

Did you have a specific reason to get the heap dump using code? You should be able to acquire a Heap dump (hprof) from within MAT using File > Acquire heap dump. VisualVm also can do that I believe (right-click on process?). There is also the jmap command that can output a heap dump. Just to save you some time for next time ;)

Marc-Andre


From: linuxtools-dev-bounces@xxxxxxxxxxx [linuxtools-dev-bounces@xxxxxxxxxxx] on behalf of Francis Giraldeau [francis.giraldeau@xxxxxxxxx]
Sent: Wednesday, August 06 2014 11:15 AM
To: Linux Tools developer discussions
Subject: [linuxtools-dev] Memory usage of TmfExperiment

I used Eclipse Memory Analyzer (MAT) to find the object holding a reference to a large temporary chunk of memory. It appears that TmfExperiment is not AutoClosable as other traces, and calling dispose() method on the experiment solved the issue. (Whole story: http://multivax.blogspot.ca/2014/08/pinpoint-memory-usage-of-java-program.html )

For the debugging, I needed the HeapDump class. However, I could not find it in other linuxtools plug-ins, and I don't know how to search for that class in p2 repo, such as Orbit. I think that would be very helpful to have it in the class path. Here is the slightly modified version I have: 


Cheers,

Francis

Back to the top