Description
JMX
The Monitoring and Management API exposes details of the current GC. Such information can be viewed from a different process using CLI or GUI tools such as jconsole
. Users can inspect the GC count, GC time, the start/stop time of the last GC, and the heap size before/after the last GC.
The JMX can expose GC-specific information, too. For G1, it includes split information for the concurrent GC and the old-generation GC, respectively.
GCSpy
GCSpy lets users look into the details of the GC. Although we are uncertain how useful this tool is, such an interface does visualizes the heap in a nice way, allowing us to inspect, for example, the block occupancy in ImmixSpace or the MiMalloc-based MarkSweepSpace.
What should we do?
The VM binding should be able to implement its own remote monitoring framework, such as JMX. So in theory, we don't have to implement this in mmtk-core. We can implement MMTk-specific MBeans in the mmtk-openjdk binding.
But it should be nice if the mmtk-core can provide a VM-agnostic remote monitoring framework. Once this is done, we can inspect any VM that uses MMTk in the same way. If we develop any tool, we can reuse that tool for all VM bindings.
We may need the API described in #1302 to implement something like GCSpy.