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());
232
233 // Unload nmethods.
234 CodeCache::do_unloading(&is_alive, purged_class);
235
236 // Prune dead klasses from subklass/sibling/implementor lists.
237 Klass::clean_weak_klass_links();
238 }
239
240 {
241 GCTraceTime(Debug, gc, phases) t("Scrub String Table", gc_timer());
242 // Delete entries for dead interned strings.
243 StringTable::unlink(&is_alive);
244 }
245
246 {
247 GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", gc_timer());
248 // Clean up unreferenced symbols in symbol table.
249 SymbolTable::unlink();
250 }
251
252 gc_tracer()->report_object_count_after_gc(&is_alive);
253 }
254
255
256 void GenMarkSweep::mark_sweep_phase2() {
257 // Now all live objects are marked, compute the new object addresses.
|
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());
232
233 // Unload nmethods.
234 CodeCache::do_unloading(&is_alive, purged_class);
235
236 // Prune dead klasses from subklass/sibling/implementor lists.
237 Klass::clean_weak_klass_links(purged_class);
238 }
239
240 {
241 GCTraceTime(Debug, gc, phases) t("Scrub String Table", gc_timer());
242 // Delete entries for dead interned strings.
243 StringTable::unlink(&is_alive);
244 }
245
246 {
247 GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", gc_timer());
248 // Clean up unreferenced symbols in symbol table.
249 SymbolTable::unlink();
250 }
251
252 gc_tracer()->report_object_count_after_gc(&is_alive);
253 }
254
255
256 void GenMarkSweep::mark_sweep_phase2() {
257 // Now all live objects are marked, compute the new object addresses.
|