546 }
547
548 // This is the point where the entire marking should have completed.
549 assert(_marking_stack.is_empty(), "Marking should have completed");
550
551 {
552 GCTraceTime(Debug, gc, phases) t("Weak Processing", _gc_timer);
553 WeakProcessor::weak_oops_do(is_alive_closure(), &do_nothing_cl);
554 }
555
556 {
557 GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer);
558
559 // Unload classes and purge the SystemDictionary.
560 bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), _gc_timer);
561
562 // Unload nmethods.
563 CodeCache::do_unloading(is_alive_closure(), purged_class);
564
565 // Prune dead klasses from subklass/sibling/implementor lists.
566 Klass::clean_weak_klass_links();
567 }
568
569 {
570 GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer);
571 // Delete entries for dead interned strings.
572 StringTable::unlink(is_alive_closure());
573 }
574
575 {
576 GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", _gc_timer);
577 // Clean up unreferenced symbols in symbol table.
578 SymbolTable::unlink();
579 }
580
581 _gc_tracer->report_object_count_after_gc(is_alive_closure());
582 }
583
584
585 void PSMarkSweep::mark_sweep_phase2() {
586 GCTraceTime(Info, gc, phases) tm("Phase 2: Compute new object addresses", _gc_timer);
|
546 }
547
548 // This is the point where the entire marking should have completed.
549 assert(_marking_stack.is_empty(), "Marking should have completed");
550
551 {
552 GCTraceTime(Debug, gc, phases) t("Weak Processing", _gc_timer);
553 WeakProcessor::weak_oops_do(is_alive_closure(), &do_nothing_cl);
554 }
555
556 {
557 GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer);
558
559 // Unload classes and purge the SystemDictionary.
560 bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), _gc_timer);
561
562 // Unload nmethods.
563 CodeCache::do_unloading(is_alive_closure(), purged_class);
564
565 // Prune dead klasses from subklass/sibling/implementor lists.
566 Klass::clean_weak_klass_links(purged_class);
567 }
568
569 {
570 GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer);
571 // Delete entries for dead interned strings.
572 StringTable::unlink(is_alive_closure());
573 }
574
575 {
576 GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", _gc_timer);
577 // Clean up unreferenced symbols in symbol table.
578 SymbolTable::unlink();
579 }
580
581 _gc_tracer->report_object_count_after_gc(is_alive_closure());
582 }
583
584
585 void PSMarkSweep::mark_sweep_phase2() {
586 GCTraceTime(Info, gc, phases) tm("Phase 2: Compute new object addresses", _gc_timer);
|