649 OopsInGenClosure* old_gen_closure,
650 CLDClosure* cld_closure) {
651 MarkingCodeBlobClosure mark_code_closure(root_closure, CodeBlobToOopClosure::FixRelocations);
652
653 process_roots(scope, SO_ScavengeCodeCache, root_closure, root_closure,
654 cld_closure, cld_closure, &mark_code_closure);
655
656 if (!_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
657 root_closure->reset_generation();
658 }
659
660 // When collection is parallel, all threads get to cooperate to do
661 // old generation scanning.
662 old_gen_closure->set_generation(_old_gen);
663 rem_set()->younger_refs_iterate(_old_gen, old_gen_closure, scope->n_threads());
664 old_gen_closure->reset_generation();
665
666 _process_strong_tasks->all_tasks_completed(scope->n_threads());
667 }
668
669 void GenCollectedHeap::conc_process_roots(StrongRootsScope* scope,
670 bool young_gen_as_roots,
671 ScanningOption so,
672 bool only_strong_roots,
673 OopsInGenClosure* root_closure,
674 CLDClosure* cld_closure) {
675 MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
676 OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
677 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
678
679 process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
680
681 if (young_gen_as_roots &&
682 !_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
683 root_closure->set_generation(_young_gen);
684 _young_gen->oop_iterate(root_closure);
685 root_closure->reset_generation();
686 }
687
688 _process_strong_tasks->all_tasks_completed(scope->n_threads());
689 }
|
649 OopsInGenClosure* old_gen_closure,
650 CLDClosure* cld_closure) {
651 MarkingCodeBlobClosure mark_code_closure(root_closure, CodeBlobToOopClosure::FixRelocations);
652
653 process_roots(scope, SO_ScavengeCodeCache, root_closure, root_closure,
654 cld_closure, cld_closure, &mark_code_closure);
655
656 if (!_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
657 root_closure->reset_generation();
658 }
659
660 // When collection is parallel, all threads get to cooperate to do
661 // old generation scanning.
662 old_gen_closure->set_generation(_old_gen);
663 rem_set()->younger_refs_iterate(_old_gen, old_gen_closure, scope->n_threads());
664 old_gen_closure->reset_generation();
665
666 _process_strong_tasks->all_tasks_completed(scope->n_threads());
667 }
668
669 void GenCollectedHeap::cms_process_roots(StrongRootsScope* scope,
670 bool young_gen_as_roots,
671 ScanningOption so,
672 bool only_strong_roots,
673 OopsInGenClosure* root_closure,
674 CLDClosure* cld_closure) {
675 MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
676 OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
677 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
678
679 process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
680
681 if (young_gen_as_roots &&
682 !_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
683 root_closure->set_generation(_young_gen);
684 _young_gen->oop_iterate(root_closure);
685 root_closure->reset_generation();
686 }
687
688 _process_strong_tasks->all_tasks_completed(scope->n_threads());
689 }
|