Java Tools Tutorials - Herong's Tutorial Notes - Version 5.32, by Dr. Herong Yang
Installing Visual GC Plugin
This section provides a tutorial example on how to install the Visual GC plugin to Java VisualVM and monitor GC activities.
One very interesting plugin is the Visual GC, developed by Jiri Sedlacek. The description says:
Integration of the Visual GC tool into VisualVM. Visual GC user interface is displayed for each local or remote application with performance counters available via jvmstat API.
The Visual GC tool attaches to an instrumented HotSpot JVM and collects and graphically displays garbage collection, class loader, and HotSpot compiler performance data.
See the Visual GC home page for information on using the tool: http://java.sun.com/performance/jvmstat/visualgc.html.
Let's try it out:
1. Run Java VisualVM, and click "Tools > Plugins".
2. Click the "Available Plugins" tab and check "Visual GC" in the list.
3. Click the "Install" button and follow the installation screen to finish.
4. Run LongSleep.java and connect Java VisualVM to monitor it.
5. Click the new "Visual GC" tab, representing the Visual GC plugin.
You will see GC activities are monitored and displayed as
space bars, line graphs and histograms as shown below:
Last update: 2015.
Table of Contents