Mercurial > hg > graal-compiler
comparison src/share/vm/memory/genCollectedHeap.cpp @ 14308:870aedf4ba4f
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 | ff355e26c78d |
children | 63a4eb8bcd23 |
comparison
equal
deleted
inserted
replaced
14307:7ab52431bc9f | 14308:870aedf4ba4f |
---|---|
590 | 590 |
591 void GenCollectedHeap:: | 591 void GenCollectedHeap:: |
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 bool is_scavenging, | |
596 SharedHeap::ScanningOption so, | 595 SharedHeap::ScanningOption so, |
597 OopsInGenClosure* not_older_gens, | 596 OopsInGenClosure* not_older_gens, |
598 bool do_code_roots, | 597 bool do_code_roots, |
599 OopsInGenClosure* older_gens, | 598 OopsInGenClosure* older_gens, |
600 KlassClosure* klass_closure) { | 599 KlassClosure* klass_closure) { |
601 // General strong roots. | 600 // General strong roots. |
602 | 601 |
603 if (!do_code_roots) { | 602 if (!do_code_roots) { |
604 SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, | 603 SharedHeap::process_strong_roots(activate_scope, so, |
605 not_older_gens, NULL, klass_closure); | 604 not_older_gens, NULL, klass_closure); |
606 } else { | 605 } else { |
607 bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active()); | 606 bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active()); |
608 CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking); | 607 CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking); |
609 SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, | 608 SharedHeap::process_strong_roots(activate_scope, so, |
610 not_older_gens, &code_roots, klass_closure); | 609 not_older_gens, &code_roots, klass_closure); |
611 } | 610 } |
612 | 611 |
613 if (younger_gens_as_roots) { | 612 if (younger_gens_as_roots) { |
614 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) { | 613 if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) { |