65

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.

trincot
  • 263,463
  • 30
  • 215
  • 251
ripper234
  • 212,480
  • 262
  • 617
  • 892

4 Answers4

57

Eclipse Memory analyzer http://www.eclipse.org/mat/

dparnas
  • 4,040
  • 4
  • 32
  • 51
  • 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? – GR Envoy 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
33

Java VisualVM, jvisualvm, included with the JDK. A pathologic Swing program is examined here.

Community
  • 1
  • 1
trashgod
  • 200,320
  • 28
  • 229
  • 974
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 :(

ripper234
  • 212,480
  • 262
  • 617
  • 892
nanda
  • 24,170
  • 12
  • 68
  • 90
  • 1
    Well, 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
  • 550
  • 5
  • 8
Arndt
  • 31
  • 1
  • 2
  • 4
    Closed 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