comparison src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp @ 10:28372612af5e

6362677: Change parallel GC collector default number of parallel GC threads. Summary: Use the same default number of GC threads as used by ParNewGC and ConcMarkSweepGC (i.e., the 5/8th rule). Reviewed-by: ysr, tonyp
author jmasa
date Fri, 22 Feb 2008 17:17:14 -0800
parents a61af66fc99e
children d1605aabd0a1
comparison
equal deleted inserted replaced
9:173195ff483a 10:28372612af5e
37 // Do basic sizing work 37 // Do basic sizing work
38 this->TwoGenerationCollectorPolicy::initialize_flags(); 38 this->TwoGenerationCollectorPolicy::initialize_flags();
39 39
40 // If the user hasn't explicitly set the number of worker 40 // If the user hasn't explicitly set the number of worker
41 // threads, set the count. 41 // threads, set the count.
42 if (ParallelGCThreads == 0) { 42 assert(UseSerialGC ||
43 assert(UseParallelGC, "Setting ParallelGCThreads without UseParallelGC"); 43 !FLAG_IS_DEFAULT(ParallelGCThreads) ||
44 ParallelGCThreads = os::active_processor_count(); 44 (ParallelGCThreads > 0),
45 } 45 "ParallelGCThreads should be set before flag initialization");
46 46
47 // The survivor ratio's are calculated "raw", unlike the 47 // The survivor ratio's are calculated "raw", unlike the
48 // default gc, which adds 2 to the ratio value. We need to 48 // default gc, which adds 2 to the ratio value. We need to
49 // make sure the values are valid before using them. 49 // make sure the values are valid before using them.
50 if (MinSurvivorRatio < 3) { 50 if (MinSurvivorRatio < 3) {