8233301: Implementation of JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination

Deprecate the ParallelScavenge + SerialOld GC combinations by deprecating the UseParallelOldGC flag. Also reviewed by Bernd Eckenfels<ecki@zusammenkunft.net>.

Reviewed-by: pliden
This commit is contained in:
Thomas Schatzl 2019-11-27 10:19:45 +01:00
parent ddb7954946
commit 198beefccb
4 changed files with 7 additions and 4 deletions

View File

@ -166,10 +166,11 @@
"Use the Garbage-First garbage collector") \
\
product(bool, UseParallelGC, false, \
"Use the Parallel Scavenge garbage collector") \
"Use the Parallel garbage collector.") \
\
product(bool, UseParallelOldGC, false, \
"Use the Parallel Old garbage collector") \
"Use the Parallel or Serial garbage collector when collecting " \
"the old generation. Deprecated.") \
\
experimental(bool, UseEpsilonGC, false, \
"Use the Epsilon (no-op) garbage collector") \

View File

@ -528,6 +528,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "CompactFields", JDK_Version::jdk(14), JDK_Version::jdk(15), JDK_Version::jdk(16) },
{ "MonitorBound", JDK_Version::jdk(14), JDK_Version::jdk(15), JDK_Version::jdk(16) },
{ "G1RSetScanBlockSize", JDK_Version::jdk(14), JDK_Version::jdk(15), JDK_Version::jdk(16) },
{ "UseParallelOldGC", JDK_Version::jdk(14), JDK_Version::jdk(15), JDK_Version::jdk(16) },
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },

View File

@ -28,7 +28,7 @@ package gc.startup_warnings;
* @key gc
* @bug 8006398
* @requires vm.gc.Parallel
* @summary Test that the ParallelScavenge+SerialOld combination does not print a warning message
* @summary Test that the ParallelScavenge+SerialOld combination prints a deprecation message
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@ -44,7 +44,7 @@ public class TestParallelScavengeSerialOld {
public static void main(String args[]) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-XX:-UseParallelOldGC", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldNotContain("deprecated");
output.shouldContain("deprecated");
output.shouldNotContain("error");
output.shouldHaveExitValue(0);
}

View File

@ -48,6 +48,7 @@ public class VMDeprecatedOptions {
{"AllowRedefinitionToAddDeleteMethods", "true"},
{"CompactFields", "true"},
{"FieldsAllocationStyle", "1"},
{"UseParallelOldGC", "false"},
// deprecated alias flags (see also aliased_jvm_flags):
{"DefaultMaxRAMFraction", "4"},