From 2f2223d7524c4405cc7ca6ab77da62016bbfa911 Mon Sep 17 00:00:00 2001 From: William Kemper Date: Tue, 23 Jul 2024 16:50:25 +0000 Subject: [PATCH] 8336944: Shenandoah: Should only relativize stack chunks for successful evacuations Reviewed-by: shade, ysr --- src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp index 5c5b6f7ebe5..f93ca9d6d7d 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp @@ -1178,11 +1178,10 @@ oop ShenandoahHeap::evacuate_object(oop p, Thread* thread) { // Try to install the new forwarding pointer. oop copy_val = cast_to_oop(copy); - ContinuationGCSupport::relativize_stack_chunk(copy_val); - oop result = ShenandoahForwarding::try_update_forwardee(p, copy_val); if (result == copy_val) { // Successfully evacuated. Our copy is now the public one! + ContinuationGCSupport::relativize_stack_chunk(copy_val); shenandoah_assert_correct(nullptr, copy_val); return copy_val; } else {