92
93 {
94 TraceCollectorStats tcs(heap->monitoring_support()->stw_collection_counters());
95 VM_ShenandoahStartEvacuation finishMark;
96 heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::final_mark_gross);
97 VMThread::execute(&finishMark);
98 heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::final_mark_gross);
99 }
100
101 if (! should_terminate()) {
102 GCTraceTime(Info, gc) time("Concurrent evacuation ", gc_timer, GCCause::_no_gc, true);
103 TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
104 heap->do_evacuation();
105 }
106
107 if (heap->is_evacuation_in_progress()) {
108 MutexLocker mu(Threads_lock);
109 heap->set_evacuation_in_progress(false);
110 }
111 heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::reset_bitmaps);
112 heap->reset_mark_bitmap(heap->conc_workers());
113 heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::reset_bitmaps);
114
115 gc_timer->register_gc_end();
116 } else {
117 Thread::current()->_ParkEvent->park(10) ;
118 // yield();
119 }
120
121 // Make sure the _do_full_gc flag changes are seen.
122 OrderAccess::storeload();
123 }
124 }
125
126 void ShenandoahConcurrentThread::stop_service() {
127 // Nothing to do here.
128 }
129
130 void ShenandoahConcurrentThread::do_full_gc(GCCause::Cause cause) {
131
132 assert(Thread::current()->is_Java_thread(), "expect Java thread here");
|
92
93 {
94 TraceCollectorStats tcs(heap->monitoring_support()->stw_collection_counters());
95 VM_ShenandoahStartEvacuation finishMark;
96 heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::final_mark_gross);
97 VMThread::execute(&finishMark);
98 heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::final_mark_gross);
99 }
100
101 if (! should_terminate()) {
102 GCTraceTime(Info, gc) time("Concurrent evacuation ", gc_timer, GCCause::_no_gc, true);
103 TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
104 heap->do_evacuation();
105 }
106
107 if (heap->is_evacuation_in_progress()) {
108 MutexLocker mu(Threads_lock);
109 heap->set_evacuation_in_progress(false);
110 }
111 heap->shenandoahPolicy()->record_phase_start(ShenandoahCollectorPolicy::reset_bitmaps);
112 heap->reset_next_mark_bitmap(heap->conc_workers());
113 heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::reset_bitmaps);
114
115 gc_timer->register_gc_end();
116 } else {
117 Thread::current()->_ParkEvent->park(10) ;
118 // yield();
119 }
120
121 // Make sure the _do_full_gc flag changes are seen.
122 OrderAccess::storeload();
123 }
124 }
125
126 void ShenandoahConcurrentThread::stop_service() {
127 // Nothing to do here.
128 }
129
130 void ShenandoahConcurrentThread::do_full_gc(GCCause::Cause cause) {
131
132 assert(Thread::current()->is_Java_thread(), "expect Java thread here");
|