Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmap/jhat vs jVisualVM

I understand that jmap is used to create heap dumps and the same can be analysed by Jhat.

jVisualVM also can be used to analyze the heap dumps (and can do much more tasks such as profiling etc).

But what is the difference between analyzing heap dumps using jHat and visualVM (other than one if using Web and second is desktop). What Sun is providing different tools and which one is better?

PS: I have limited understanding of these tools as I have worked on limited profiling/analysis tools such as JProbe, Java Heap Dump Analyzer, etc. Please correct if my understanding is wrong somewhere.

like image 723
Sandeep Jindal Avatar asked May 12 '11 13:05

Sandeep Jindal


1 Answers

jmap and jhat are the core tools with command line interface. VisualVM is a visual workbench integrating command line tools to manage things more easily without having to work through the command line options. If you know and free comfortable working with command line tools then go with them. VisualVM doesnt do anything extra but provides a good visual interface for a better user experience. I believe it internally uses jmap/jhat.

The difference is analogous to the difference between a graphical debugger and a commandline debugger. It is often easier to work in a visual mode.

like image 165
Drona Avatar answered Sep 19 '22 10:09

Drona