src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp
changeset 59247 56bf71d64d51
parent 58741 62e16c1e0f66
child 59248 e92153ed8bdc
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
   303       report_illegal_transition("commit bypass");
   303       report_illegal_transition("commit bypass");
   304   }
   304   }
   305 }
   305 }
   306 
   306 
   307 void ShenandoahHeapRegion::clear_live_data() {
   307 void ShenandoahHeapRegion::clear_live_data() {
   308   OrderAccess::release_store_fence<size_t>(&_live_data, 0);
   308   Atomic::release_store_fence<size_t>(&_live_data, 0);
   309 }
   309 }
   310 
   310 
   311 void ShenandoahHeapRegion::reset_alloc_metadata() {
   311 void ShenandoahHeapRegion::reset_alloc_metadata() {
   312   _tlab_allocs = 0;
   312   _tlab_allocs = 0;
   313   _gclab_allocs = 0;
   313   _gclab_allocs = 0;
   349   assert(Thread::current()->is_VM_thread(), "by VM thread");
   349   assert(Thread::current()->is_VM_thread(), "by VM thread");
   350   _live_data = (s >> LogHeapWordSize);
   350   _live_data = (s >> LogHeapWordSize);
   351 }
   351 }
   352 
   352 
   353 size_t ShenandoahHeapRegion::get_live_data_words() const {
   353 size_t ShenandoahHeapRegion::get_live_data_words() const {
   354   return OrderAccess::load_acquire(&_live_data);
   354   return Atomic::load_acquire(&_live_data);
   355 }
   355 }
   356 
   356 
   357 size_t ShenandoahHeapRegion::get_live_data_bytes() const {
   357 size_t ShenandoahHeapRegion::get_live_data_bytes() const {
   358   return get_live_data_words() * HeapWordSize;
   358   return get_live_data_words() * HeapWordSize;
   359 }
   359 }