diff --git a/src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp b/src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp index 24cd41d84c6..46e930b5359 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp @@ -131,10 +131,7 @@ bool ShenandoahOldGC::collect(GCCause::Cause cause) { // the space. This would be the last action if there is nothing to evacuate. entry_cleanup_early(); - { - ShenandoahHeapLocker locker(heap->lock()); - heap->free_set()->log_status(); - } + heap->free_set()->log_status_under_lock(); assert(!heap->is_concurrent_strong_root_in_progress(), "No evacuations during old gc.");