IntelliJ IDEA 2020.1 Help

Analyze memory snapshots

Memory snapshots are useful for identifying performance problems. In IntelliJ IDEA, you can analyze memory snapshots in the Profiler tool window.

Open a snapshot

  1. Press Ctrl+Shift+A or select Help | Find Action from the main menu.

  2. In the dialog that opens, type hprof to find the Open Hprof Snapshot action.

    The Open Hprof Snapshot action in the Find Action dialog

  3. In the dialog that opens, select the necessary memory dump file with the .hprof extension and click Open.

    IntelliJ IDEA opens the Profiler tool window with a memory snapshot breakdown.

    A memory dump file shown in the Profiler tool window

Read the memory snapshot file

The Profiler tool window has several tabs:

  • The Summary tab shows general information, for example, the total size, number of instances and stack traces of the file.

    The Summary tab on Profiler tool window

  • The GC Roots tab shows all the root objects grouped by classes.

    The GC Roots tab on Profiler tool window

  • The Classes tab shows all classes sorted by their numbers of instances or size.

     The Classes tab shown in the Profiler tool window

  • The Object view tab opens after you double-click an item on the Classes tab. It shows the first 100,000 class instances with the field value viewer.

    A class shown in the Object view of the Profiler tool window

Last modified: 15 April 2020