O'Reilly logo

Clojure High Performance Programming - Second Edition by Shantanu Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Profiling code with VisualVM

The Oracle JDK (also OpenJDK) comes with a powerful profiler called VisualVM; the distribution that comes with the JDK is known as Java VisualVM and can be invoked using the binary executable:

jvisualvm

This launches the GUI profiler app where you can connect to running instances of the JVM. The profiler has powerful features (https://visualvm.java.net/features.html) that can be useful for finding various bottlenecks in code. Besides analyzing heap dump and thread dump, VisualVM can interactively graph CPU and heap consumption, and thread status in near real time. It also has sampling and tracing profilers for both CPU and memory.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required