528 }
529
530 // Flush marking stack.
531 follow_stack();
532
533 // Process reference objects found during marking
534 {
535 GCTraceTime(Debug, gc, phases) t("Reference Processing", _gc_timer);
536
537 ref_processor()->setup_policy(clear_all_softrefs);
538 ReferenceProcessorPhaseTimes pt(_gc_timer, ref_processor()->num_q());
539 const ReferenceProcessorStats& stats =
540 ref_processor()->process_discovered_references(
541 is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, &pt);
542 gc_tracer()->report_gc_reference_stats(stats);
543 pt.print_all_references();
544 }
545
546 {
547 GCTraceTime(Debug, gc, phases) t("Weak Processing", _gc_timer);
548 WeakProcessor::unlink_or_oops_do(is_alive_closure(), mark_and_push_closure(), follow_stack_closure());
549 }
550
551 // This is the point where the entire marking should have completed.
552 assert(_marking_stack.is_empty(), "Marking should have completed");
553
554 {
555 GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer);
556
557 // Unload classes and purge the SystemDictionary.
558 bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), _gc_timer);
559
560 // Unload nmethods.
561 CodeCache::do_unloading(is_alive_closure(), purged_class);
562
563 // Prune dead klasses from subklass/sibling/implementor lists.
564 Klass::clean_weak_klass_links(is_alive_closure());
565 }
566
567 {
568 GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer);
|
528 }
529
530 // Flush marking stack.
531 follow_stack();
532
533 // Process reference objects found during marking
534 {
535 GCTraceTime(Debug, gc, phases) t("Reference Processing", _gc_timer);
536
537 ref_processor()->setup_policy(clear_all_softrefs);
538 ReferenceProcessorPhaseTimes pt(_gc_timer, ref_processor()->num_q());
539 const ReferenceProcessorStats& stats =
540 ref_processor()->process_discovered_references(
541 is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, &pt);
542 gc_tracer()->report_gc_reference_stats(stats);
543 pt.print_all_references();
544 }
545
546 {
547 GCTraceTime(Debug, gc, phases) t("Weak Processing", _gc_timer);
548 WeakProcessor::weak_oops_do(is_alive_closure(), mark_and_push_closure(), follow_stack_closure());
549 }
550
551 // This is the point where the entire marking should have completed.
552 assert(_marking_stack.is_empty(), "Marking should have completed");
553
554 {
555 GCTraceTime(Debug, gc, phases) t("Class Unloading", _gc_timer);
556
557 // Unload classes and purge the SystemDictionary.
558 bool purged_class = SystemDictionary::do_unloading(is_alive_closure(), _gc_timer);
559
560 // Unload nmethods.
561 CodeCache::do_unloading(is_alive_closure(), purged_class);
562
563 // Prune dead klasses from subklass/sibling/implementor lists.
564 Klass::clean_weak_klass_links(is_alive_closure());
565 }
566
567 {
568 GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer);
|