< prev index next >

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

Print this page




 576     ShenandoahHeap::heap()->monitoring_support()->update_counters();
 577   }
 578 }
 579 
 580 void ShenandoahControlThread::notify_heap_changed() {
 581   // This is called from allocation path, and thus should be fast.
 582 
 583   // Update monitoring counters when we took a new region. This amortizes the
 584   // update costs on slow path.
 585   if (_do_counters_update.is_unset()) {
 586     _do_counters_update.set();
 587   }
 588   // Notify that something had changed.
 589   if (_heap_changed.is_unset()) {
 590     _heap_changed.set();
 591   }
 592 }
 593 
 594 void ShenandoahControlThread::pacing_notify_alloc(size_t words) {
 595   assert(ShenandoahPacing, "should only call when pacing is enabled");
 596   Atomic::add(words, &_allocs_seen);
 597 }
 598 
 599 void ShenandoahControlThread::set_forced_counters_update(bool value) {
 600   _force_counters_update.set_cond(value);
 601 }
 602 
 603 void ShenandoahControlThread::print() const {
 604   print_on(tty);
 605 }
 606 
 607 void ShenandoahControlThread::print_on(outputStream* st) const {
 608   st->print("Shenandoah Concurrent Thread");
 609   Thread::print_on(st);
 610   st->cr();
 611 }
 612 
 613 void ShenandoahControlThread::start() {
 614   create_and_start();
 615 }
 616 


 576     ShenandoahHeap::heap()->monitoring_support()->update_counters();
 577   }
 578 }
 579 
 580 void ShenandoahControlThread::notify_heap_changed() {
 581   // This is called from allocation path, and thus should be fast.
 582 
 583   // Update monitoring counters when we took a new region. This amortizes the
 584   // update costs on slow path.
 585   if (_do_counters_update.is_unset()) {
 586     _do_counters_update.set();
 587   }
 588   // Notify that something had changed.
 589   if (_heap_changed.is_unset()) {
 590     _heap_changed.set();
 591   }
 592 }
 593 
 594 void ShenandoahControlThread::pacing_notify_alloc(size_t words) {
 595   assert(ShenandoahPacing, "should only call when pacing is enabled");
 596   Atomic::add(&_allocs_seen, words);
 597 }
 598 
 599 void ShenandoahControlThread::set_forced_counters_update(bool value) {
 600   _force_counters_update.set_cond(value);
 601 }
 602 
 603 void ShenandoahControlThread::print() const {
 604   print_on(tty);
 605 }
 606 
 607 void ShenandoahControlThread::print_on(outputStream* st) const {
 608   st->print("Shenandoah Concurrent Thread");
 609   Thread::print_on(st);
 610   st->cr();
 611 }
 612 
 613 void ShenandoahControlThread::start() {
 614   create_and_start();
 615 }
 616 
< prev index next >