--- old/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp 2020-02-17 17:22:56.492254231 +0800 +++ new/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp 2020-02-17 17:22:56.494254303 +0800 @@ -1209,8 +1209,6 @@ ClassLoaderDataGraph::purge(); } - _g1h->resize_heap_if_necessary(); - compute_new_sizes(); verify_during_pause(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "Remark after"); @@ -1382,6 +1380,11 @@ // races with it goes around and waits for Cleanup to finish. _g1h->increment_total_collections(); + { + GCTraceTime(Debug, gc, phases) debug("Expand heap after concurrent mark", _gc_timer_cm); + _g1h->expand_heap_after_concurrent_mark(); + } + // Local statistics double recent_cleanup_time = (os::elapsedTime() - start); _total_cleanup_time += recent_cleanup_time;