629 "save marks have not been newly set.");
630
631 {
632 // DefNew needs to run with n_threads == 0, to make sure the serial
633 // version of the card table scanning code is used.
634 // See: CardTableRS::non_clean_card_iterate_possibly_parallel.
635 StrongRootsScope srs(0);
636
637 gch->young_process_roots(&srs,
638 &fsc_with_no_gc_barrier,
639 &fsc_with_gc_barrier,
640 &cld_scan_closure);
641 }
642
643 // "evacuate followers".
644 evacuate_followers.do_void();
645
646 FastKeepAliveClosure keep_alive(this, &scan_weak_ref);
647 ReferenceProcessor* rp = ref_processor();
648 rp->setup_policy(clear_all_soft_refs);
649 ReferenceProcessorPhaseTimes pt(_gc_timer, rp->num_q());
650 const ReferenceProcessorStats& stats =
651 rp->process_discovered_references(&is_alive, &keep_alive, &evacuate_followers,
652 NULL, &pt);
653 gc_tracer.report_gc_reference_stats(stats);
654 gc_tracer.report_tenuring_threshold(tenuring_threshold());
655 pt.print_all_references();
656
657 assert(gch->no_allocs_since_save_marks(), "save marks have not been newly set.");
658
659 WeakProcessor::weak_oops_do(&is_alive, &keep_alive);
660
661 // Verify that the usage of keep_alive didn't copy any objects.
662 assert(gch->no_allocs_since_save_marks(), "save marks have not been newly set.");
663
664 if (!_promotion_failed) {
665 // Swap the survivor spaces.
666 eden()->clear(SpaceDecorator::Mangle);
667 from()->clear(SpaceDecorator::Mangle);
668 if (ZapUnusedHeapArea) {
669 // This is now done here because of the piece-meal mangling which
|
629 "save marks have not been newly set.");
630
631 {
632 // DefNew needs to run with n_threads == 0, to make sure the serial
633 // version of the card table scanning code is used.
634 // See: CardTableRS::non_clean_card_iterate_possibly_parallel.
635 StrongRootsScope srs(0);
636
637 gch->young_process_roots(&srs,
638 &fsc_with_no_gc_barrier,
639 &fsc_with_gc_barrier,
640 &cld_scan_closure);
641 }
642
643 // "evacuate followers".
644 evacuate_followers.do_void();
645
646 FastKeepAliveClosure keep_alive(this, &scan_weak_ref);
647 ReferenceProcessor* rp = ref_processor();
648 rp->setup_policy(clear_all_soft_refs);
649 ReferenceProcessorPhaseTimes pt(_gc_timer, rp->num_queues());
650 const ReferenceProcessorStats& stats =
651 rp->process_discovered_references(&is_alive, &keep_alive, &evacuate_followers,
652 NULL, &pt);
653 gc_tracer.report_gc_reference_stats(stats);
654 gc_tracer.report_tenuring_threshold(tenuring_threshold());
655 pt.print_all_references();
656
657 assert(gch->no_allocs_since_save_marks(), "save marks have not been newly set.");
658
659 WeakProcessor::weak_oops_do(&is_alive, &keep_alive);
660
661 // Verify that the usage of keep_alive didn't copy any objects.
662 assert(gch->no_allocs_since_save_marks(), "save marks have not been newly set.");
663
664 if (!_promotion_failed) {
665 // Swap the survivor spaces.
666 eden()->clear(SpaceDecorator::Mangle);
667 from()->clear(SpaceDecorator::Mangle);
668 if (ZapUnusedHeapArea) {
669 // This is now done here because of the piece-meal mangling which
|