< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp

Print this page




 670   if (!_heap->uncommit_bitmap_slice(this)) {
 671     report_java_out_of_memory("Unable to uncommit bitmaps for region");
 672   }
 673   _heap->decrease_committed(ShenandoahHeapRegion::region_size_bytes());
 674 }
 675 
 676 void ShenandoahHeapRegion::set_state(RegionState to) {
 677   EventShenandoahHeapRegionStateChange evt;
 678   if (evt.should_commit()){
 679     evt.set_index((unsigned)region_number());
 680     evt.set_start((uintptr_t)bottom());
 681     evt.set_used(used());
 682     evt.set_from(_state);
 683     evt.set_to(to);
 684     evt.commit();
 685   }
 686   _state = to;
 687 }
 688 
 689 void ShenandoahHeapRegion::record_pin() {
 690   Atomic::add((size_t)1, &_critical_pins);
 691 }
 692 
 693 void ShenandoahHeapRegion::record_unpin() {
 694   assert(pin_count() > 0, "Region " SIZE_FORMAT " should have non-zero pins", region_number());
 695   Atomic::sub((size_t)1, &_critical_pins);
 696 }
 697 
 698 size_t ShenandoahHeapRegion::pin_count() const {
 699   return Atomic::load(&_critical_pins);
 700 }


 670   if (!_heap->uncommit_bitmap_slice(this)) {
 671     report_java_out_of_memory("Unable to uncommit bitmaps for region");
 672   }
 673   _heap->decrease_committed(ShenandoahHeapRegion::region_size_bytes());
 674 }
 675 
 676 void ShenandoahHeapRegion::set_state(RegionState to) {
 677   EventShenandoahHeapRegionStateChange evt;
 678   if (evt.should_commit()){
 679     evt.set_index((unsigned)region_number());
 680     evt.set_start((uintptr_t)bottom());
 681     evt.set_used(used());
 682     evt.set_from(_state);
 683     evt.set_to(to);
 684     evt.commit();
 685   }
 686   _state = to;
 687 }
 688 
 689 void ShenandoahHeapRegion::record_pin() {
 690   Atomic::add(&_critical_pins, (size_t)1);
 691 }
 692 
 693 void ShenandoahHeapRegion::record_unpin() {
 694   assert(pin_count() > 0, "Region " SIZE_FORMAT " should have non-zero pins", region_number());
 695   Atomic::sub((size_t)1, &_critical_pins);
 696 }
 697 
 698 size_t ShenandoahHeapRegion::pin_count() const {
 699   return Atomic::load(&_critical_pins);
 700 }
< prev index next >