Mercurial > hg > truffle
diff src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.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 | ce8f6bb717c9 |
children | 7426d8d76305 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu Aug 07 15:02:18 2014 -0700 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Tue Jan 14 16:40:33 2014 +0100 @@ -3038,7 +3038,6 @@ gch->gen_process_strong_roots(_cmsGen->level(), true, // younger gens are roots true, // activate StrongRootsScope - false, // not scavenging SharedHeap::ScanningOption(roots_scanning_options()), ¬Older, true, // walk code active on stacks @@ -3106,7 +3105,6 @@ gch->gen_process_strong_roots(_cmsGen->level(), true, // younger gens are roots true, // activate StrongRootsScope - false, // not scavenging SharedHeap::ScanningOption(roots_scanning_options()), ¬Older, true, // walk code active on stacks @@ -3308,7 +3306,7 @@ void CMSCollector::setup_cms_unloading_and_verification_state() { const bool should_verify = VerifyBeforeGC || VerifyAfterGC || VerifyDuringGC || VerifyBeforeExit; - const int rso = SharedHeap::SO_Strings | SharedHeap::SO_CodeCache; + const int rso = SharedHeap::SO_Strings | SharedHeap::SO_AllCodeCache; // We set the proper root for this CMS cycle here. if (should_unload_classes()) { // Should unload classes this cycle @@ -3744,10 +3742,9 @@ gch->gen_process_strong_roots(_cmsGen->level(), true, // younger gens are roots true, // activate StrongRootsScope - false, // not scavenging SharedHeap::ScanningOption(roots_scanning_options()), ¬Older, - true, // walk all of code cache if (so & SO_CodeCache) + true, // walk all of code cache if (so & SO_AllCodeCache) NULL, &klass_closure); } @@ -5244,14 +5241,13 @@ gch->gen_process_strong_roots(_collector->_cmsGen->level(), false, // yg was scanned above false, // this is parallel code - false, // not scavenging SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()), &par_mri_cl, - true, // walk all of code cache if (so & SO_CodeCache) + true, // walk all of code cache if (so & SO_AllCodeCache) NULL, &klass_closure); assert(_collector->should_unload_classes() - || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache), + || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_AllCodeCache), "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops"); _timer.stop(); if (PrintCMSStatistics != 0) { @@ -5381,14 +5377,13 @@ gch->gen_process_strong_roots(_collector->_cmsGen->level(), false, // yg was scanned above false, // this is parallel code - false, // not scavenging SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()), &par_mrias_cl, - true, // walk all of code cache if (so & SO_CodeCache) + true, // walk all of code cache if (so & SO_AllCodeCache) NULL, NULL); // The dirty klasses will be handled below assert(_collector->should_unload_classes() - || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache), + || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_AllCodeCache), "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops"); _timer.stop(); if (PrintCMSStatistics != 0) { @@ -5972,7 +5967,6 @@ gch->gen_process_strong_roots(_cmsGen->level(), true, // younger gens as roots false, // use the local StrongRootsScope - false, // not scavenging SharedHeap::ScanningOption(roots_scanning_options()), &mrias_cl, true, // walk code active on stacks @@ -5980,7 +5974,7 @@ NULL); // The dirty klasses will be handled below assert(should_unload_classes() - || (roots_scanning_options() & SharedHeap::SO_CodeCache), + || (roots_scanning_options() & SharedHeap::SO_AllCodeCache), "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops"); }