< prev index next >

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

Print this page




  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 
  26 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
  27 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  28 #include "gc/shenandoah/shenandoahFreeSet.hpp"
  29 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
  30 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  31 #include "gc/shenandoah/shenandoahHeuristics.hpp"
  32 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
  33 #include "gc/shenandoah/shenandoahControlThread.hpp"
  34 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  35 #include "gc/shenandoah/shenandoahUtils.hpp"
  36 #include "gc/shenandoah/shenandoahVMOperations.hpp"
  37 #include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
  38 #include "memory/iterator.hpp"
  39 #include "memory/universe.hpp"

  40 
  41 ShenandoahControlThread::ShenandoahControlThread() :
  42   ConcurrentGCThread(),
  43   _alloc_failure_waiters_lock(Mutex::leaf, "ShenandoahAllocFailureGC_lock", true, Monitor::_safepoint_check_always),
  44   _gc_waiters_lock(Mutex::leaf, "ShenandoahRequestedGC_lock", true, Monitor::_safepoint_check_always),
  45   _periodic_task(this),
  46   _requested_gc_cause(GCCause::_no_cause_specified),
  47   _degen_point(ShenandoahHeap::_degenerated_outside_cycle),
  48   _allocs_seen(0) {
  49 
  50   create_and_start(ShenandoahCriticalControlThreadPriority ? CriticalPriority : NearMaxPriority);
  51   _periodic_task.enroll();
  52   _periodic_satb_flush_task.enroll();
  53 }
  54 
  55 ShenandoahControlThread::~ShenandoahControlThread() {
  56   // This is here so that super is called.
  57 }
  58 
  59 void ShenandoahPeriodicTask::task() {




  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 
  26 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
  27 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  28 #include "gc/shenandoah/shenandoahFreeSet.hpp"
  29 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
  30 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  31 #include "gc/shenandoah/shenandoahHeuristics.hpp"
  32 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
  33 #include "gc/shenandoah/shenandoahControlThread.hpp"
  34 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  35 #include "gc/shenandoah/shenandoahUtils.hpp"
  36 #include "gc/shenandoah/shenandoahVMOperations.hpp"
  37 #include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
  38 #include "memory/iterator.hpp"
  39 #include "memory/universe.hpp"
  40 #include "runtime/atomic.hpp"
  41 
  42 ShenandoahControlThread::ShenandoahControlThread() :
  43   ConcurrentGCThread(),
  44   _alloc_failure_waiters_lock(Mutex::leaf, "ShenandoahAllocFailureGC_lock", true, Monitor::_safepoint_check_always),
  45   _gc_waiters_lock(Mutex::leaf, "ShenandoahRequestedGC_lock", true, Monitor::_safepoint_check_always),
  46   _periodic_task(this),
  47   _requested_gc_cause(GCCause::_no_cause_specified),
  48   _degen_point(ShenandoahHeap::_degenerated_outside_cycle),
  49   _allocs_seen(0) {
  50 
  51   create_and_start(ShenandoahCriticalControlThreadPriority ? CriticalPriority : NearMaxPriority);
  52   _periodic_task.enroll();
  53   _periodic_satb_flush_task.enroll();
  54 }
  55 
  56 ShenandoahControlThread::~ShenandoahControlThread() {
  57   // This is here so that super is called.
  58 }
  59 
  60 void ShenandoahPeriodicTask::task() {


< prev index next >