8233301: Implementation of JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination
authortschatzl
Wed, 27 Nov 2019 10:19:45 +0100
changeset 59288 3b1afeb49a20
parent 59274 eb3e2a5c2bcd
child 59289 c887851da33d
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<ecki@zusammenkunft.net>. Reviewed-by: pliden
src/hotspot/share/gc/shared/gc_globals.hpp
src/hotspot/share/runtime/arguments.cpp
test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java
test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java
--- 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")                      \
--- 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() },
--- 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);
   }
--- 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"},