--- a/src/hotspot/share/gc/z/zDriver.cpp Mon Oct 21 14:04:16 2019 +0800
+++ b/src/hotspot/share/gc/z/zDriver.cpp Mon Oct 21 09:51:24 2019 +0200
@@ -250,11 +250,17 @@
case GCCause::_z_allocation_stall:
case GCCause::_z_proactive:
case GCCause::_z_high_usage:
- case GCCause::_metadata_GC_threshold:
// Start asynchronous GC
_gc_cycle_port.send_async(cause);
break;
+ case GCCause::_metadata_GC_threshold:
+ // Start asynchronous GC, but only if the GC is warm
+ if (ZStatCycle::is_warm()) {
+ _gc_cycle_port.send_async(cause);
+ }
+ break;
+
case GCCause::_gc_locker:
// Restart VM operation previously blocked by the GC locker
_gc_locker_port.signal();