comparison src/share/vm/memory/genCollectedHeap.cpp @ 20254:9fec19bb0659

8032379: Remove the is_scavenging flag to process_strong_roots Summary: Refactor the strong root processing to avoid using a boolean in addition to the ScanOption enum. Reviewed-by: stefank, tschatzl, ehelin, jmasa
author mgerdin
date Tue, 14 Jan 2014 16:40:33 +0100
parents 0982ec23da03
children 7426d8d76305
comparison
equal deleted inserted replaced
20253:731e8175d53f 20254:9fec19bb0659
595 595
596 void GenCollectedHeap:: 596 void GenCollectedHeap::
597 gen_process_strong_roots(int level, 597 gen_process_strong_roots(int level,
598 bool younger_gens_as_roots, 598 bool younger_gens_as_roots,
599 bool activate_scope, 599 bool activate_scope,
600 bool is_scavenging,
601 SharedHeap::ScanningOption so, 600 SharedHeap::ScanningOption so,
602 OopsInGenClosure* not_older_gens, 601 OopsInGenClosure* not_older_gens,
603 bool do_code_roots, 602 bool do_code_roots,
604 OopsInGenClosure* older_gens, 603 OopsInGenClosure* older_gens,
605 KlassClosure* klass_closure) { 604 KlassClosure* klass_closure) {
606 // General strong roots. 605 // General strong roots.
607 606
608 if (!do_code_roots) { 607 if (!do_code_roots) {
609 SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, 608 SharedHeap::process_strong_roots(activate_scope, so,
610 not_older_gens, NULL, klass_closure); 609 not_older_gens, NULL, klass_closure);
611 } else { 610 } else {
612 bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active()); 611 bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active());
613 CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking); 612 CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking);
614 SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, 613 SharedHeap::process_strong_roots(activate_scope, so,
615 not_older_gens, &code_roots, klass_closure); 614 not_older_gens, &code_roots, klass_closure);
616 } 615 }
617 616
618 if (younger_gens_as_roots) { 617 if (younger_gens_as_roots) {
619 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) { 618 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {