< prev index next >

src/hotspot/share/gc/shared/gcVMOperations.cpp

Print this page
@@ -138,12 +138,12 @@
    }
    VM_GC_Sync_Operation::doit_epilogue();
  }
  
  bool VM_GC_HeapInspection::doit_prologue() {
-   if (_full_gc && UseZGC) {
-     // ZGC cannot perform a synchronous GC cycle from within the VM thread.
+   if (_full_gc && (UseZGC || UseShenandoahGC)) {
+     // ZGC and Shenandoah cannot perform a synchronous GC cycle from within the VM thread.
      // So VM_GC_HeapInspection::collect() is a noop. To respect the _full_gc
      // flag a synchronous GC cycle is performed from the caller thread in the
      // prologue.
      Universe::heap()->collect(GCCause::_heap_inspection);
    }
< prev index next >