mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
Merge
This commit is contained in:
commit
be38ea68e5
1 changed files with 25 additions and 21 deletions
|
@ -1454,30 +1454,34 @@ void Arguments::set_parallel_gc_flags() {
|
|||
|
||||
// If no heap maximum was requested explicitly, use some reasonable fraction
|
||||
// of the physical memory, up to a maximum of 1GB.
|
||||
if (UseParallelGC) {
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads,
|
||||
Abstract_VM_Version::parallel_worker_threads());
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads,
|
||||
Abstract_VM_Version::parallel_worker_threads());
|
||||
if (ParallelGCThreads == 0) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"The Parallel GC can not be combined with -XX:ParallelGCThreads=0\n");
|
||||
vm_exit(1);
|
||||
}
|
||||
|
||||
// If InitialSurvivorRatio or MinSurvivorRatio were not specified, but the
|
||||
// SurvivorRatio has been set, reset their default values to SurvivorRatio +
|
||||
// 2. By doing this we make SurvivorRatio also work for Parallel Scavenger.
|
||||
// See CR 6362902 for details.
|
||||
if (!FLAG_IS_DEFAULT(SurvivorRatio)) {
|
||||
if (FLAG_IS_DEFAULT(InitialSurvivorRatio)) {
|
||||
FLAG_SET_DEFAULT(InitialSurvivorRatio, SurvivorRatio + 2);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(MinSurvivorRatio)) {
|
||||
FLAG_SET_DEFAULT(MinSurvivorRatio, SurvivorRatio + 2);
|
||||
}
|
||||
|
||||
// If InitialSurvivorRatio or MinSurvivorRatio were not specified, but the
|
||||
// SurvivorRatio has been set, reset their default values to SurvivorRatio +
|
||||
// 2. By doing this we make SurvivorRatio also work for Parallel Scavenger.
|
||||
// See CR 6362902 for details.
|
||||
if (!FLAG_IS_DEFAULT(SurvivorRatio)) {
|
||||
if (FLAG_IS_DEFAULT(InitialSurvivorRatio)) {
|
||||
FLAG_SET_DEFAULT(InitialSurvivorRatio, SurvivorRatio + 2);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(MinSurvivorRatio)) {
|
||||
FLAG_SET_DEFAULT(MinSurvivorRatio, SurvivorRatio + 2);
|
||||
}
|
||||
}
|
||||
|
||||
if (UseParallelOldGC) {
|
||||
// Par compact uses lower default values since they are treated as
|
||||
// minimums. These are different defaults because of the different
|
||||
// interpretation and are not ergonomically set.
|
||||
if (FLAG_IS_DEFAULT(MarkSweepDeadRatio)) {
|
||||
FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
|
||||
}
|
||||
if (UseParallelOldGC) {
|
||||
// Par compact uses lower default values since they are treated as
|
||||
// minimums. These are different defaults because of the different
|
||||
// interpretation and are not ergonomically set.
|
||||
if (FLAG_IS_DEFAULT(MarkSweepDeadRatio)) {
|
||||
FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue