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