< prev index next >

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

Print this page




  83           /* allMemoryPoolsAffected */    true,
  84           /* recordGCBeginTime = */       true,
  85           /* recordPreGCUsage = */        false,
  86           /* recordPeakUsage = */         false,
  87           /* recordPostGCUsage = */       false,
  88           /* recordAccumulatedGCTime = */ true,
  89           /* recordGCEndTime = */         true,
  90           /* countCollection = */         true
  91   );
  92 
  93   _heap->heuristics()->record_gc_start();
  94 }
  95 
  96 ShenandoahGCPauseMark::~ShenandoahGCPauseMark() {
  97   _heap->gc_timer()->register_gc_phase_end(Ticks::now());
  98   _heap->heuristics()->record_gc_end();
  99 }
 100 
 101 ShenandoahGCPhase::ShenandoahGCPhase(const ShenandoahPhaseTimings::Phase phase) :
 102   _heap(ShenandoahHeap::heap()), _phase(phase) {
 103    assert(!Thread::current()->is_Worker_thread() &&
 104               (Thread::current()->is_VM_thread() ||
 105                Thread::current()->is_ConcurrentGC_thread()),
 106           "Must be set by these threads");
 107   _parent_phase = _current_phase;
 108   _current_phase = phase;
 109 
 110   _heap->phase_timings()->record_phase_start(_phase);
 111 }
 112 
 113 ShenandoahGCPhase::~ShenandoahGCPhase() {
 114   _heap->phase_timings()->record_phase_end(_phase);
 115   _current_phase = _parent_phase;
 116 }
 117 
 118 bool ShenandoahGCPhase::is_valid_phase(ShenandoahPhaseTimings::Phase phase) {
 119   return phase >= 0 && phase < ShenandoahPhaseTimings::_num_phases;
 120 }
 121 
 122 bool ShenandoahGCPhase::is_root_work_phase() {
 123   switch(current_phase()) {
 124     case ShenandoahPhaseTimings::scan_roots:
 125     case ShenandoahPhaseTimings::update_roots:
 126     case ShenandoahPhaseTimings::init_evac:




  83           /* allMemoryPoolsAffected */    true,
  84           /* recordGCBeginTime = */       true,
  85           /* recordPreGCUsage = */        false,
  86           /* recordPeakUsage = */         false,
  87           /* recordPostGCUsage = */       false,
  88           /* recordAccumulatedGCTime = */ true,
  89           /* recordGCEndTime = */         true,
  90           /* countCollection = */         true
  91   );
  92 
  93   _heap->heuristics()->record_gc_start();
  94 }
  95 
  96 ShenandoahGCPauseMark::~ShenandoahGCPauseMark() {
  97   _heap->gc_timer()->register_gc_phase_end(Ticks::now());
  98   _heap->heuristics()->record_gc_end();
  99 }
 100 
 101 ShenandoahGCPhase::ShenandoahGCPhase(const ShenandoahPhaseTimings::Phase phase) :
 102   _heap(ShenandoahHeap::heap()), _phase(phase) {
 103   assert(Thread::current()->is_VM_thread() ||
 104          Thread::current()->is_ConcurrentGC_thread(),
 105         "Must be set by these threads");

 106   _parent_phase = _current_phase;
 107   _current_phase = phase;
 108 
 109   _heap->phase_timings()->record_phase_start(_phase);
 110 }
 111 
 112 ShenandoahGCPhase::~ShenandoahGCPhase() {
 113   _heap->phase_timings()->record_phase_end(_phase);
 114   _current_phase = _parent_phase;
 115 }
 116 
 117 bool ShenandoahGCPhase::is_valid_phase(ShenandoahPhaseTimings::Phase phase) {
 118   return phase >= 0 && phase < ShenandoahPhaseTimings::_num_phases;
 119 }
 120 
 121 bool ShenandoahGCPhase::is_root_work_phase() {
 122   switch(current_phase()) {
 123     case ShenandoahPhaseTimings::scan_roots:
 124     case ShenandoahPhaseTimings::update_roots:
 125     case ShenandoahPhaseTimings::init_evac:


< prev index next >