--- old/src/hotspot/share/gc/parallel/psParallelCompact.hpp 2019-12-03 11:29:30.335075002 +0100 +++ new/src/hotspot/share/gc/parallel/psParallelCompact.hpp 2019-12-03 11:29:29.982064040 +0100 @@ -630,26 +630,26 @@ } inline bool ParallelCompactData::RegionData::mark_normal() { - return Atomic::cmpxchg(NormalRegion, &_shadow_state, UnusedRegion, memory_order_relaxed) == UnusedRegion; + return Atomic::cmpxchg(&_shadow_state, UnusedRegion, NormalRegion, memory_order_relaxed) == UnusedRegion; } inline bool ParallelCompactData::RegionData::mark_shadow() { if (_shadow_state != UnusedRegion) return false; - return Atomic::cmpxchg(ShadowRegion, &_shadow_state, UnusedRegion, memory_order_relaxed) == UnusedRegion; + return Atomic::cmpxchg(&_shadow_state, UnusedRegion, ShadowRegion, memory_order_relaxed) == UnusedRegion; } inline void ParallelCompactData::RegionData::mark_filled() { - int old = Atomic::cmpxchg(FilledShadow, &_shadow_state, ShadowRegion, memory_order_relaxed); - assert(old == Shadow, "Fail to mark the region as filled"); + int old = Atomic::cmpxchg(&_shadow_state, ShadowRegion, FilledShadow, memory_order_relaxed); + assert(old == ShadowRegion, "Fail to mark the region as filled"); } inline bool ParallelCompactData::RegionData::mark_copied() { - return Atomic::cmpxchg(CopiedShadow, &_shadow_state, FilledShadow, memory_order_relaxed) == FilledShadow; + return Atomic::cmpxchg(&_shadow_state, FilledShadow, CopiedShadow, memory_order_relaxed) == FilledShadow; } void ParallelCompactData::RegionData::shadow_to_normal() { - int old = Atomic::cmpxchg(NormalRegion, &_shadow_state, ShadowRegion, memory_order_relaxed); - assert(old == Shadow, "Fail to mark the region as finish"); + int old = Atomic::cmpxchg(&_shadow_state, ShadowRegion, NormalRegion, memory_order_relaxed); + assert(old == ShadowRegion, "Fail to mark the region as finish"); } inline ParallelCompactData::RegionData*