Additionally the ability to query is_gc_operation() is introduced in the base class VM_Operation and overridden in appropriate VM operations. This provides a clear and efficient interface to query the category of a VM operation.
Renaming VM_GC_Sync_Operation to VM_Heap_Sync_Operation to make it clear that all sub-classes is related to GC. While VM_GC_HeapInspection is a serviceability operation it attempts to trigger a collection, hence it is put underneath VM_GC_Collect_Operation->VM_GC_Service_Operation. However only classes that inherits from VM_GC_Collect_Operation are considered to return true for is_gc_operation() as VM_GC_HeapInspection is considered to not belong to "GC activity".
ZGC and Shenandoah do not use sub-classing of VM_Heap_Sync_Operation, but their respective base classes and special classes for GC activity are marked as returning true for is_gc_operation().
The only is_XX_operation that is specified in VM_Operation is is_gc_operation to not clutter with cases that are not used (is_gc_operation will be used by
- blocks
-
JDK-8359110 Log accumulated GC and process CPU time upon VM exit
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/c748d358
-
Review(master) openjdk/jdk/25896