859 process_roots(scope, SO_ScavengeCodeCache, root_closure,
860 cld_closure, cld_closure, &mark_code_closure);
861
862 if (_process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) {
863 root_closure->reset_generation();
864 }
865
866 // When collection is parallel, all threads get to cooperate to do
867 // old generation scanning.
868 old_gen_closure->set_generation(_old_gen);
869 rem_set()->younger_refs_iterate(_old_gen, old_gen_closure, scope->n_threads());
870 old_gen_closure->reset_generation();
871
872 _process_strong_tasks->all_tasks_completed(scope->n_threads());
873 }
874
875 void GenCollectedHeap::full_process_roots(StrongRootsScope* scope,
876 bool is_adjust_phase,
877 ScanningOption so,
878 bool only_strong_roots,
879 OopsInGenClosure* root_closure,
880 CLDClosure* cld_closure) {
881 MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
882 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
883
884 process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
885 _process_strong_tasks->all_tasks_completed(scope->n_threads());
886 }
887
888 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) {
889 WeakProcessor::oops_do(root_closure);
890 _young_gen->ref_processor()->weak_oops_do(root_closure);
891 _old_gen->ref_processor()->weak_oops_do(root_closure);
892 }
893
894 bool GenCollectedHeap::no_allocs_since_save_marks() {
895 return _young_gen->no_allocs_since_save_marks() &&
896 _old_gen->no_allocs_since_save_marks();
897 }
898
899 bool GenCollectedHeap::supports_inline_contig_alloc() const {
|
859 process_roots(scope, SO_ScavengeCodeCache, root_closure,
860 cld_closure, cld_closure, &mark_code_closure);
861
862 if (_process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) {
863 root_closure->reset_generation();
864 }
865
866 // When collection is parallel, all threads get to cooperate to do
867 // old generation scanning.
868 old_gen_closure->set_generation(_old_gen);
869 rem_set()->younger_refs_iterate(_old_gen, old_gen_closure, scope->n_threads());
870 old_gen_closure->reset_generation();
871
872 _process_strong_tasks->all_tasks_completed(scope->n_threads());
873 }
874
875 void GenCollectedHeap::full_process_roots(StrongRootsScope* scope,
876 bool is_adjust_phase,
877 ScanningOption so,
878 bool only_strong_roots,
879 OopClosure* root_closure,
880 CLDClosure* cld_closure) {
881 MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
882 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
883
884 process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
885 _process_strong_tasks->all_tasks_completed(scope->n_threads());
886 }
887
888 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) {
889 WeakProcessor::oops_do(root_closure);
890 _young_gen->ref_processor()->weak_oops_do(root_closure);
891 _old_gen->ref_processor()->weak_oops_do(root_closure);
892 }
893
894 bool GenCollectedHeap::no_allocs_since_save_marks() {
895 return _young_gen->no_allocs_since_save_marks() &&
896 _old_gen->no_allocs_since_save_marks();
897 }
898
899 bool GenCollectedHeap::supports_inline_contig_alloc() const {
|