Basic Analysis

Here you will learn the basics on snapshots and memory analysis. We will focus on heap dumps only, the most complete type of snapshot.

Open the heap dump

From the main menu, select File > Open Snapshot,
then select a heap dump and press Open.
In this cheat sheet we will use a sample heap dump. Please open it by activating the action link below.

Open Class Histogram

Class Histogram shows the classes found in the snapshot, the number of objects for each class, the heap memory consumption of these objects, and the minimum retained size of the objects. To open the view press
Open Class Histogram
toolbar button.

Sort histogram by classloader

To see the histogram sorted by classloaders select the
Group by classloader
combobox toolbar button. To return to the initial sorting select the Group by class option of the same combobox.

Compare two snapshots

To compare two snapshots open a baseline snapshot and a later snapshot and from the snapshot Class Histogram view press the
Compare to another Heap Dump
toolbar button, and select the baseline snapshot to see the differences.

There is also a more general comparison view using the compare basket. Tables and trees are added to the compare basket from the Navigation History.

Export histogram data

To export the histogram sorted by classes or classloaders press the
Export
combobox toolbar button. Now you can choose among HTML, CSV and TXT export formats.
To copy the selection to the clipboard press
Ctrl-C
or use the context menu action.
Congratulations! You have learned how to perform the basic analysis of the heap dump.