In this tutorial I show you how to use VisualVM to perform a Java Heap Dump snapshot in a live executing Java application in eclipse IDE.
Ahem… Let me ask…First….What is Java VisualVM?
Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a Java Virtual Machine (JVM), and for troubleshooting and profiling these applications.
This includes objects allocated on the Heap, Thread state, Execution environment information, Stack etc. Great for debugging dog slow applications!!
Ok cool, now what is a Heap Dump?
A heap dump is a snapshot of the memory of a Java Process at a single point in time. This contains data about Java objects, classes in the heap, class, fields, references, class loader names, static content, Thread Stacks etc.
And... Why would I create a Heap Dump?
There are many, but here are my two favourites.
When performing performance analysis on an application, performing a heap dump during certain execution phases will provide you will critical information on the state of the Java Process, such as object allocation on the heap and thread states.
Second, when an application crashes due to a Java java.lang.OutOfMemoryError, you can enforce the JVM to perform a snapshot and capture the application’s state via a heap dump. This heap dump will typically be placed into a java_pid*[id].hprof file. You can then load the heap dump file into a visualizer to understand the java applications state – this provides a good insight and clue into why the program crashed. Although if your application is running on a cloud based ephemeral file system this may be tricky. But the majority of applications that require a heap dump for analysis are most likely not in the cloud and rather dedicated high performance data centers.
Last one… You mentioned compressed Oops, whats that?
Ill create another video but read this for now chum.
http://docs.oracle.com/javase/8/docs/...
Don’t forget to subscribe for more tech content!
Cheers!
Philip
Links
Eclipse VisualVM Launcher Integration Set-up Guide
• VisualVM Eclipse Launcher - Java Profiling...
VisualVM
https://visualvm.github.io/
Eclipse Visual VM Integration
https://visualvm.github.io/idesupport...
Java Profiling
http://docs.oracle.com/javase/7/docs/...
Auf dieser Seite können Sie das Online-Video Java Heap Dump Analysis - VisualVM Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Philip Starritt 09 Juli 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 64,493 Mal angesehen und es wurde von 333 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!