--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-10-18 16:42:30.164189137 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-10-18 16:42:29.737175993 +0200 @@ -1150,6 +1150,8 @@ } void G1CollectedHeap::resize_heap_if_necessary() { + assert_at_safepoint_on_vm_thread(); + // Capacity, free and used after the GC counted as full regions to // include the waste in the following calculations. const size_t capacity_after_gc = capacity(); @@ -1972,6 +1974,7 @@ switch (cause) { case GCCause::_gc_locker: return GCLockerInvokesConcurrent; case GCCause::_g1_humongous_allocation: return true; + case GCCause::_g1_periodic_collection: return G1PeriodicGCInvokesConcurrent; default: return is_user_requested_concurrent_full_gc(cause); } }