191 // Need new claim bits before marking starts.
192 ClassLoaderDataGraph::clear_claimed_marks();
193
194 {
195 StrongRootsScope srs(1);
196
197 gch->full_process_roots(&srs,
198 false, // not the adjust phase
199 GenCollectedHeap::SO_None,
200 ClassUnloading, // only strong roots if ClassUnloading
201 // is enabled
202 &follow_root_closure,
203 &follow_cld_closure);
204 }
205
206 // Process reference objects found during marking
207 {
208 GCTraceTime(Debug, gc, phases) tm_m("Reference Processing", gc_timer());
209
210 ref_processor()->setup_policy(clear_all_softrefs);
211 ReferenceProcessorPhaseTimes pt(_gc_timer, ref_processor()->num_q());
212 const ReferenceProcessorStats& stats =
213 ref_processor()->process_discovered_references(
214 &is_alive, &keep_alive, &follow_stack_closure, NULL, &pt);
215 pt.print_all_references();
216 gc_tracer()->report_gc_reference_stats(stats);
217 }
218
219 // This is the point where the entire marking should have completed.
220 assert(_marking_stack.is_empty(), "Marking should have completed");
221
222 {
223 GCTraceTime(Debug, gc, phases) tm_m("Weak Processing", gc_timer());
224 WeakProcessor::weak_oops_do(&is_alive, &do_nothing_cl);
225 }
226
227 {
228 GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", gc_timer());
229
230 // Unload classes and purge the SystemDictionary.
231 bool purged_class = SystemDictionary::do_unloading(&is_alive, gc_timer());
|
191 // Need new claim bits before marking starts.
192 ClassLoaderDataGraph::clear_claimed_marks();
193
194 {
195 StrongRootsScope srs(1);
196
197 gch->full_process_roots(&srs,
198 false, // not the adjust phase
199 GenCollectedHeap::SO_None,
200 ClassUnloading, // only strong roots if ClassUnloading
201 // is enabled
202 &follow_root_closure,
203 &follow_cld_closure);
204 }
205
206 // Process reference objects found during marking
207 {
208 GCTraceTime(Debug, gc, phases) tm_m("Reference Processing", gc_timer());
209
210 ref_processor()->setup_policy(clear_all_softrefs);
211 ReferenceProcessorPhaseTimes pt(_gc_timer, ref_processor()->num_queues());
212 const ReferenceProcessorStats& stats =
213 ref_processor()->process_discovered_references(
214 &is_alive, &keep_alive, &follow_stack_closure, NULL, &pt);
215 pt.print_all_references();
216 gc_tracer()->report_gc_reference_stats(stats);
217 }
218
219 // This is the point where the entire marking should have completed.
220 assert(_marking_stack.is_empty(), "Marking should have completed");
221
222 {
223 GCTraceTime(Debug, gc, phases) tm_m("Weak Processing", gc_timer());
224 WeakProcessor::weak_oops_do(&is_alive, &do_nothing_cl);
225 }
226
227 {
228 GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", gc_timer());
229
230 // Unload classes and purge the SystemDictionary.
231 bool purged_class = SystemDictionary::do_unloading(&is_alive, gc_timer());
|