Skip to content
Permalink
Browse files

8261500: Shenandoah: reconsider region live data memory ordering

Reviewed-by: zgu
  • Loading branch information
shipilev committed Feb 15, 2021
1 parent df0897e commit c6eedda89e32e18f6274238dd6d3f14c2de8679d
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp
@@ -80,7 +80,7 @@ inline void ShenandoahHeapRegion::increase_live_data_gc_words(size_t s) {
}

inline void ShenandoahHeapRegion::internal_increase_live_data(size_t s) {
size_t new_live_data = Atomic::add(&_live_data, s);
size_t new_live_data = Atomic::add(&_live_data, s, memory_order_relaxed);
#ifdef ASSERT
size_t live_bytes = new_live_data * HeapWordSize;
size_t used_bytes = used();
@@ -90,11 +90,11 @@ inline void ShenandoahHeapRegion::internal_increase_live_data(size_t s) {
}

inline void ShenandoahHeapRegion::clear_live_data() {
Atomic::release_store_fence(&_live_data, (size_t)0);
Atomic::store(&_live_data, (size_t)0);
}

inline size_t ShenandoahHeapRegion::get_live_data_words() const {
return Atomic::load_acquire(&_live_data);
return Atomic::load(&_live_data);
}

inline size_t ShenandoahHeapRegion::get_live_data_bytes() const {

1 comment on commit c6eedda

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on c6eedda Feb 15, 2021

Please sign in to comment.