--- old/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp 2019-02-27 09:32:34.057495138 +0100 +++ new/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp 2019-02-27 09:32:33.787486949 +0100 @@ -89,7 +89,9 @@ if ((os::elapsedTime() - _last_periodic_gc_attempt_s) > (G1PeriodicGCInterval / 1000.0)) { log_debug(gc, periodic)("Checking for periodic GC."); if (should_start_periodic_gc()) { - Universe::heap()->collect(GCCause::_g1_periodic_collection); + if (!G1CollectedHeap::heap()->attempt_collect(GCCause::_g1_periodic_collection, false)) { + log_debug(gc, periodic)("GC request denied. Skipping."); + } } _last_periodic_gc_attempt_s = os::elapsedTime(); }