6362677: Change parallel GC collector default number of parallel GC threads

Use the same default number of GC threads as used by ParNewGC and ConcMarkSweepGC (i.e., the 5/8th rule).

Reviewed-by: ysr, tonyp
This commit is contained in:
Jon Masamitsu 2008-02-22 17:17:14 -08:00
parent 74f243990c
commit 63f1de52fc
8 changed files with 174 additions and 81 deletions

View file

@ -39,10 +39,10 @@ class GenerationSizer : public TwoGenerationCollectorPolicy {
// If the user hasn't explicitly set the number of worker
// threads, set the count.
if (ParallelGCThreads == 0) {
assert(UseParallelGC, "Setting ParallelGCThreads without UseParallelGC");
ParallelGCThreads = os::active_processor_count();
}
assert(UseSerialGC ||
!FLAG_IS_DEFAULT(ParallelGCThreads) ||
(ParallelGCThreads > 0),
"ParallelGCThreads should be set before flag initialization");
// The survivor ratio's are calculated "raw", unlike the
// default gc, which adds 2 to the ratio value. We need to