111
112 // Perform full GC
113 do_it(cause);
114
115 if (heap->mode()->is_generational()) {
116 ShenandoahGenerationalFullGC::handle_completion(heap);
117 }
118
119 if (metrics.is_good_progress()) {
120 heap->notify_gc_progress();
121 } else {
122 // Nothing to do. Tell the allocation path that we have failed to make
123 // progress, and it can finally fail.
124 heap->notify_gc_no_progress();
125 }
126
127 // Regardless if progress was made, we record that we completed a "successful" full GC.
128 _generation->heuristics()->record_success_full();
129 heap->shenandoah_policy()->record_success_full();
130
131 {
132 ShenandoahTimingsTracker timing(ShenandoahPhaseTimings::full_gc_propagate_gc_state);
133 heap->propagate_gc_state_to_all_threads();
134 }
135 }
136
137 void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) {
138 ShenandoahHeap* heap = ShenandoahHeap::heap();
139 heap->release_injected_pins();
140
141 // A full GC may be entered directly, or as an upgrade from a failed
142 // degenerated GC. In the latter case, self-forwarded objects may be
143 // present from the failed evacuation. Drain those marks before any phase
144 // (verify, update_roots, phase1_mark_heap) walks headers.
145 {
146 ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_un_self_forward);
147 heap->un_self_forward_cset_regions();
148 }
149
150 if (heap->mode()->is_generational()) {
|
111
112 // Perform full GC
113 do_it(cause);
114
115 if (heap->mode()->is_generational()) {
116 ShenandoahGenerationalFullGC::handle_completion(heap);
117 }
118
119 if (metrics.is_good_progress()) {
120 heap->notify_gc_progress();
121 } else {
122 // Nothing to do. Tell the allocation path that we have failed to make
123 // progress, and it can finally fail.
124 heap->notify_gc_no_progress();
125 }
126
127 // Regardless if progress was made, we record that we completed a "successful" full GC.
128 _generation->heuristics()->record_success_full();
129 heap->shenandoah_policy()->record_success_full();
130
131 // Leaving full GC, we need to flip barriers back to idle.
132 ShenandoahCodeRoots::arm_nmethods();
133
134 {
135 ShenandoahTimingsTracker timing(ShenandoahPhaseTimings::full_gc_propagate_gc_state);
136 heap->propagate_gc_state_to_all_threads();
137 }
138 }
139
140 void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) {
141 ShenandoahHeap* heap = ShenandoahHeap::heap();
142 heap->release_injected_pins();
143
144 // A full GC may be entered directly, or as an upgrade from a failed
145 // degenerated GC. In the latter case, self-forwarded objects may be
146 // present from the failed evacuation. Drain those marks before any phase
147 // (verify, update_roots, phase1_mark_heap) walks headers.
148 {
149 ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_un_self_forward);
150 heap->un_self_forward_cset_regions();
151 }
152
153 if (heap->mode()->is_generational()) {
|