Eclipse Mat Heap

Eclipse mat memory analyzer tool is a powerful tool to analyze heap dumps.
Eclipse mat heap. Select the option leak suspects report and click finish. Change xmx parameter value to appropriate one. In this post we will see how you can take the heap dump of your running java application and use eclipse s memory analyzer mat to identify. The heap dump file is usually stored with hprof extension.
Let s see how to load the jvm dump file in eclipse s memory analyzer plugin. When you first acquire your heap dump the mat will show you an overview of the applications memory use. Eclipse memory analyzer tool mat is by far the best tool to analyze java heap dumps. The eclipse memory analyzer is a fast and feature rich java heap analyzer that helps you find memory leaks and reduce memory consumption.
2 querying heap objects oql memory analyzer allows you to query the heap dump 3 with custom sql like queries oql. The dump analysis will be presented to you as shown in the next page. Go to eclipse mat home directory and edit memoryanalyzer ini file. Go to the file open file option in eclipse s menu bar browse to the dump file that was generated in the previous page and open it.
The pie chart in the middle shows you the biggest objects by retained size. Querying heap objects using oql this article is a follow up of 1. Heap dump analysis using eclipse memory analyzer tool mat a heap dump is a snapshot of all the java objects that exist in the heap space. In eclipse mat two types of object sizes.
Use the memory analyzer to analyze productive heap dumps with hundreds of millions of objects quickly calculate the retained sizes of objects see who is preventing the garbage collector from collecting objects run a report to automatically extract leak. If you try to open 4gb hprof and get java heap space error you should try to raise xmx above 4gb. The snapshot mainly consists. Here we continue to explore on how to investigate memory leaks of an application using memory analyzer.
There are situations in which it s necessary to set xmx parameter value above the size of parsed heap dump file.