From bee032ee79a3ec12b81e5b4ca2b2dd38ae94d61f Mon Sep 17 00:00:00 2001 From: Xiaolong Peng Date: Fri, 16 Jan 2026 22:00:08 -0800 Subject: [PATCH] More comments --- src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp index 106fdecb8c7..d5531e2cf81 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp @@ -582,6 +582,7 @@ public: previous_atomic_top = atomic_top(); assert(previous_atomic_top != nullptr, "Must not"); set_top(previous_atomic_top); // Sync current _atomic_top back to _top + // previous_atomic_top MUST be stored to _top before swapping _atomic_top with nullptr OrderAccess::fence(); if (AtomicAccess::cmpxchg(&_atomic_top, previous_atomic_top, (HeapWord*) nullptr) == previous_atomic_top) { // break when successfully exchange _atomic_top to nullptr