Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Stack trace for memory accumulation points (How to find stack for the possible accumulation points)
Stack trace for memory accumulation points [message #649996] Fri, 21 January 2011 11:20 Go to next message
manasa  is currently offline manasa Friend
Messages: 32
Registered: October 2010

I am new to MAT, and now using it to find the memory leaks in my project, from a heapdump that is generated during OOME.

I get the possible problem suspects suggested by MAT and also see shortest paths to accumulation points for each of the suspects.
But i dont find any stack traces directly to the possible accumulation points.

Is it possible to directly find such stack traces at all using MAT/ if yes, could you give any information on it.

Thanks in advance,
Re: Stack trace for memory accumulation points [message #650007 is a reply to message #649996] Fri, 21 January 2011 12:34 Go to previous message
Jonathan Lawrence is currently offline Jonathan LawrenceFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Manasa,

I hope I have interpreted your question correctly in the following answer:

The Memory Analyser Tool works from heap dumps, and hence is capable of investigating the live object graph from the JVM, but not the execution stacks for Java threads.

If your application OOME happened to occur while attempting to allocate one of the offending leak suspects, you might get details of the execution stack in the OOM Exception, but this is not guaranteed as the OOM could occur on an innocent code path.

The execution stacks which perform object allocations are not stored by the JVM and hence are not available to post-mortem tools such as MAT. The capability which MAT does provide is to see the path of objects from the GC root down to the leak suspect. Combined with some detective work on the application source code this should enable you to track down the offending code.

An alternative approach if you are using an IBM JVM would be to use IBM Monitoring and Diagnostic Tools for Java - Health Center. If your leak suspects are among the largest objects in the JVM, you could use the Object Allocations tab of the Garbage Collection tool in Health Center to trap the offending object allocations at runtime, enabling the stack trace to be viewed.

I hope this helps,

Jonathan Lawrence
IBM Java Consumability Tooling.
Previous Topic:MAT: deadlocks and stalled threads
Next Topic:Error creating heap dump
Goto Forum:

Current Time: Sat Jan 25 04:27:43 GMT 2020

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

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

Back to the top