List your favorite heap analysis tools (e.g. jprofiler, jmap, ...). Let's keep it one tool per answer, with a short list of pros and cons for each tool.
Asked
Active
Viewed 1.1e+01k times
4 Answers
58
Eclipse Memory analyzer http://www.eclipse.org/mat/
- Support for multiple JVMs
- Help with identifying sources for memory leaks (see http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6856)
- Open source and actively developed by major vendors (SAP and IBM)
- Part of Galileo release of Eclipse

dparnas
- 4,090
- 4
- 33
- 52
-
I know this is from '10, but anyone know what the tool to identify Memory Leaks was pointing to and what replaced it if anything? – Brian S Jun 24 '19 at 16:30
-
@GREnvoy the tool is called sap jvm profiler and you should be able to find some resources on google. Not sure if it's been replaced by a different tool – dparnas Aug 09 '19 at 11:47
-
is there a command line tools to detect if memory leak in the heap dump file? – Kevin Ding Sep 09 '22 at 03:02
35
Consider Java VisualVM, jvisualvm
, included with the JDK. A pathologic Swing program is examined here. For a more recent perspective, see the Monitoring and Management Guide: Using JConsole regarding jconsole
, also included with the JDK.

trashgod
- 203,806
- 29
- 246
- 1,045
-
2On Mac OS X, see [*Where did jvisualvm go?*](http://stackoverflow.com/q/13312229/230513) – trashgod Mar 12 '13 at 12:18
28
YourKit : http://www.yourkit.com/
Pros:
- The interface is clean and it's fast
- It opened a large 5-gig heap dump where jProfiler grined to a halt. And it only needed 1-2 gigs of JVM ram to do so.
Cons: Of course... it's not free :(
-
1Well, just note that when trying to open a 20GB heap with YourKit it crashed on OOME, so YourKit won't help you by allowing you have open a large heap with a commodity Macbook Pro – Opster Elasticsearch Expert Feb 02 '16 at 16:23
5
BHeapSampler http://dr-brenschede.de/bheapsampler/
- generates a class-level heap-graph as a really intuitive display of the dominant memory structures
- can process really large heap dumps
- command-line tool, usable on server side without transfering the dump to the developer's desk

Burak Kurkcu
- 580
- 5
- 8

Arndt
- 31
- 1
- 2
-
4Closed source code and throws an strange exception with a.a() obfuscation. Looks like this tool is not working. – brummfondel Nov 27 '15 at 13:30