Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8261500: Shenandoah: reconsider region live data memory ordering #2503

Closed
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -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 {
ProTip! Use n and p to navigate between commits in a pull request.