The Eclipse Memory Analyzer (https://eclipse.org/mat/) can be used to analyze heap dumps created by VisualVM. It provides additional features such as auto memory leak detection. Furthermore, by using it as an Eclipse plugin, you can quickly jump to the source code from the heap dump reports. You can use this tool either as a standalone application or as an Eclipse plugin. We will see how to use it as an Eclipse plugin in this section.
To install the Memory Analyzer plugin and analyze the memory dump, perform the following steps:
- Open
Eclipse Marketplace
(select theHelp
|Eclipse Marketplace
menu). Search forMemory Analyzer
and install the plugin:
Figure 11.11: Searching for the Memory Analyzer plugin in Eclipse Marketplace
- Open the heap dump that you saved in the previous section. Select the
File
|Open File
menu and select the.hprof
file that has been saved by VisualVM. Memory Analyzer will prompt you to select a report type:
Figure 11.12: Eclipse Memory...