- A Heap Dump is a snapshot of the Java process heap memory at a given time
- It is a useful tool to troubleshoot memory leaks and other memory related issues
- Heap Dump is used to analyse the objects state in a JVM ,usually we analyse Heap Dump during out of memory error
Steps:
- Go to $JAVA_HOME/bin
- Run the command ./jvisualvm
| Invoking Visual VM from the Java Installation |
- After running the command ./jvisualvm command it automatically opens java VisualVM window
| Java VisualVM |
- Next open the process id(pid)
| Open the MBean by selecting WebLogic Pid |
- Click on Monitor Tab --> Heap Dump Tab
| Click on Heap Dump Tab |
- Click on classes then Java VisualVM enables us to browse Heap Dumps as shown below with the classes view where we can identify the number and percentage of instances referred by each class.
| Percentage of instances referred by each class |
No comments:
Post a Comment