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 const ReferenceProcessorStats& stats =
214 ref_processor()->process_discovered_references(
215 &is_alive, &keep_alive, &follow_stack_closure, NULL, _gc_timer);
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("Class Unloading", gc_timer());
224
225 // Unload classes and purge the SystemDictionary.
226 bool purged_class = SystemDictionary::do_unloading(&is_alive, gc_timer());
227
228 // Unload nmethods.
229 CodeCache::do_unloading(&is_alive, purged_class);
230
231 // Prune dead klasses from subklass/sibling/implementor lists.
232 Klass::clean_weak_klass_links(&is_alive);
233 }
234
235 {
|
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.
234 Klass::clean_weak_klass_links(&is_alive);
235 }
236
237 {
|