--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-11-15 14:43:19.482917278 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-11-15 14:43:19.042903716 +0100 @@ -1151,6 +1151,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(); @@ -1973,6 +1975,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); } }