hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp
changeset 12228 15ffdb8224fe
parent 11756 28b6fe22e43d
child 12381 1438e0fbfa27
equal deleted inserted replaced
12227:371690c4f281 12228:15ffdb8224fe
   283   // The calculation is based on the number of marked regions we added
   283   // The calculation is based on the number of marked regions we added
   284   // to the CSet chooser in the first place, not how many remain, so
   284   // to the CSet chooser in the first place, not how many remain, so
   285   // that the result is the same during all mixed GCs that follow a cycle.
   285   // that the result is the same during all mixed GCs that follow a cycle.
   286 
   286 
   287   const size_t region_num = (size_t) _length;
   287   const size_t region_num = (size_t) _length;
   288   const size_t gc_num = (size_t) G1MaxMixedGCNum;
   288   const size_t gc_num = (size_t) G1MixedGCCountTarget;
   289   size_t result = region_num / gc_num;
   289   size_t result = region_num / gc_num;
   290   // emulate ceiling
   290   // emulate ceiling
   291   if (result * gc_num < region_num) {
   291   if (result * gc_num < region_num) {
   292     result += 1;
   292     result += 1;
   293   }
   293   }