comparison src/share/vm/memory/genCollectedHeap.cpp @ 14466:d166675568f6

8034761: Remove the do_code_roots parameter from process_strong_roots Reviewed-by: tschatzl, mgerdin, jmasa
author stefank
date Thu, 13 Feb 2014 17:44:39 +0100
parents 1e1c8d358b52
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14359:f7f0c6a77d6d 14466:d166675568f6
592 gen_process_strong_roots(int level, 592 gen_process_strong_roots(int level,
593 bool younger_gens_as_roots, 593 bool younger_gens_as_roots,
594 bool activate_scope, 594 bool activate_scope,
595 SharedHeap::ScanningOption so, 595 SharedHeap::ScanningOption so,
596 OopsInGenClosure* not_older_gens, 596 OopsInGenClosure* not_older_gens,
597 bool do_code_roots,
598 OopsInGenClosure* older_gens, 597 OopsInGenClosure* older_gens,
599 KlassClosure* klass_closure) { 598 KlassClosure* klass_closure) {
600 // General strong roots. 599 // General strong roots.
601 600
602 if (!do_code_roots) { 601 SharedHeap::process_strong_roots(activate_scope, so,
603 SharedHeap::process_strong_roots(activate_scope, so, 602 not_older_gens, klass_closure);
604 not_older_gens, NULL, klass_closure);
605 } else {
606 bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active());
607 CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking);
608 SharedHeap::process_strong_roots(activate_scope, so,
609 not_older_gens, &code_roots, klass_closure);
610 }
611 603
612 if (younger_gens_as_roots) { 604 if (younger_gens_as_roots) {
613 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) { 605 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
614 for (int i = 0; i < level; i++) { 606 for (int i = 0; i < level; i++) {
615 not_older_gens->set_generation(_gens[i]); 607 not_older_gens->set_generation(_gens[i]);
627 } 619 }
628 620
629 _gen_process_strong_tasks->all_tasks_completed(); 621 _gen_process_strong_tasks->all_tasks_completed();
630 } 622 }
631 623
632 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure, 624 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) {
633 CodeBlobClosure* code_roots) { 625 SharedHeap::process_weak_roots(root_closure);
634 SharedHeap::process_weak_roots(root_closure, code_roots);
635 // "Local" "weak" refs 626 // "Local" "weak" refs
636 for (int i = 0; i < _n_gens; i++) { 627 for (int i = 0; i < _n_gens; i++) {
637 _gens[i]->ref_processor()->weak_oops_do(root_closure); 628 _gens[i]->ref_processor()->weak_oops_do(root_closure);
638 } 629 }
639 } 630 }