# HG changeset patch # User tschatzl # Date 1574846385 -3600 # Node ID 3b1afeb49a20cb02206cbe25762b04bf975f1ba7 # Parent eb3e2a5c2bcd000175a7db79bc24797eb30a18ed 8233301: Implementation of JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination Summary: Deprecate the ParallelScavenge + SerialOld GC combinations by deprecating the UseParallelOldGC flag. Also reviewed by Bernd Eckenfels. Reviewed-by: pliden diff -r eb3e2a5c2bcd -r 3b1afeb49a20 src/hotspot/share/gc/shared/gc_globals.hpp --- a/src/hotspot/share/gc/shared/gc_globals.hpp Tue Nov 26 17:00:57 2019 +0100 +++ b/src/hotspot/share/gc/shared/gc_globals.hpp Wed Nov 27 10:19:45 2019 +0100 @@ -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") \ diff -r eb3e2a5c2bcd -r 3b1afeb49a20 src/hotspot/share/runtime/arguments.cpp --- a/src/hotspot/share/runtime/arguments.cpp Tue Nov 26 17:00:57 2019 +0100 +++ b/src/hotspot/share/runtime/arguments.cpp Wed Nov 27 10:19:45 2019 +0100 @@ -528,6 +528,7 @@ { "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() }, diff -r eb3e2a5c2bcd -r 3b1afeb49a20 test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java --- a/test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java Tue Nov 26 17:00:57 2019 +0100 +++ b/test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java Wed Nov 27 10:19:45 2019 +0100 @@ -28,7 +28,7 @@ * @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 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); } diff -r eb3e2a5c2bcd -r 3b1afeb49a20 test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java --- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Tue Nov 26 17:00:57 2019 +0100 +++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Wed Nov 27 10:19:45 2019 +0100 @@ -48,6 +48,7 @@ {"AllowRedefinitionToAddDeleteMethods", "true"}, {"CompactFields", "true"}, {"FieldsAllocationStyle", "1"}, + {"UseParallelOldGC", "false"}, // deprecated alias flags (see also aliased_jvm_flags): {"DefaultMaxRAMFraction", "4"},