diff --git a/src/hotspot/share/gc/g1/g1VMOperations.cpp b/src/hotspot/share/gc/g1/g1VMOperations.cpp index c19c399cfb6..7820c9abff7 100644 --- a/src/hotspot/share/gc/g1/g1VMOperations.cpp +++ b/src/hotspot/share/gc/g1/g1VMOperations.cpp @@ -127,6 +127,10 @@ void VM_G1CollectForAllocation::doit() { if (_word_size > 0) { // An allocation has been requested. So, try to do that first. + // During the execution of this VM operation, there may have been a concurrent active + // GCLocker, potentially leading to expansion of the Eden space by other mutators. + // If the Eden space were expanded, this allocation request might succeed without + // the need for triggering a garbage collection. _result = g1h->attempt_allocation_at_safepoint(_word_size, false /* expect_null_cur_alloc_region */); if (_result != nullptr) {