Install Memory Analyzer in Eclipse

In this tutorial lets see how to install Memory analyzer in eclipse and start analyzing both Sun/Oracle jdk heap dumps (*.hprof) and ibm jdk heap dumps (*.phd).

Installation:

Step 1:

In Eclipse, Navigate to Help -> Install New Software.

pic1

Step 2:

Enter the eclipse memory analyzer update site url: http://download.eclipse.org/mat/1.5/update-site/ and press enter. Select the necessary components. Here I am selecting only “Memory analyzer for Eclipse IDE” and not selecting “Stand-alone Memory Analyzer.”

pic2

Step 3:

Click “Next” twice, accept the terms and conditions, then click “Finish”. Once the installation is complete, we will get the below confirmation message. Press “Yes” to restart eclipse.

pic3

Step 4:

Once eclipse comes up, Navigate to “Window->Open Perspective-> Other -> Memory Analysis” to open the memory analysis perspective.

Step 5:

In the file menu, check if the options “Acquire Heap Dump” and “Open Heap Dump” are available. If so, then we are all set for analyzing a hprof heap dump file.

Navigate to File -> Open Heap Dump. Select the hprof file.

pic5

Once we select the hprof file, it may take 15-20 minutes depending on the heap dump size and CPU of the local machine, to complete analyzing and open the report as shown below.

pic6

To Open a IBM JVM Heap dump – (Portable Heap Dump (phd) format)

IBM heap dumps are generated in *.phd file format. To open *.phd heap dumps, we need to install IBM Diagnostic tool framework for java (dtfj), from the below URL.

http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/runtimes/tools/dtfj/

Step 1:

In Eclipse Memory Analyzer Window, Navigate to Help -> Install New Software and provide the dtfj url and press Enter.

pic7

Step 2:

Click Next twice, Accept the terms of the license agreements and then click Finish. IBM diagnostic tool framework will start installing. This may take 5-10 minutes. Once the installation is completed, press “Yes” to restart eclipse.

pic8

Step 3:

Once eclipse is restarted, we can now see *.phd files under known formats. To check this, navigate to File -> Open Heap Dump. Select the phd file.

pic9

Step 4:

Now the phd file will be loaded and analyzed. This step may take 15-20 minutes depending on the heap dump size.

pic10

%d bloggers like this: