8167494: Deprecate AutoGCSelectPauseMillis
authorsangheki
Mon, 17 Oct 2016 16:40:49 -0700
changeset 41714 fc78950ecfe4
parent 41713 8699d67096ed
child 41715 296ff044b943
child 41717 ca79023acae8
8167494: Deprecate AutoGCSelectPauseMillis Reviewed-by: kbarrett, ehelin
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Oct 17 21:21:53 2016 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Oct 17 16:40:49 2016 -0700
@@ -372,6 +372,7 @@
   // -------------- Deprecated Flags --------------
   // --- Non-alias flags - sorted by obsolete_in then expired_in:
   { "MaxGCMinorPauseMillis",        JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "AutoGCSelectPauseMillis",      JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
   { "UseAutoGCSelectPolicy",        JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
   { "UseParNewGC",                  JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
   { "ConvertSleepToYield",          JDK_Version::jdk(9), JDK_Version::jdk(10),     JDK_Version::jdk(11) },
--- a/hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java	Mon Oct 17 21:21:53 2016 -0700
+++ b/hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java	Mon Oct 17 16:40:49 2016 -0700
@@ -24,8 +24,8 @@
 /*
  * @test TestUseAutoGCSelectPolicy
  * @key gc
- * @bug 8166461
- * @summary Test that UseAutoGCSelectPolicy does print a warning message
+ * @bug 8166461 8167494
+ * @summary Test that UseAutoGCSelectPolicy and AutoGCSelectPauseMillis do print a warning message
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -37,9 +37,10 @@
 public class TestUseAutoGCSelectPolicy {
 
   public static void main(String args[]) throws Exception {
-    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseAutoGCSelectPolicy", "-version");
+    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseAutoGCSelectPolicy", "-XX:AutoGCSelectPauseMillis=3000", "-version");
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("deprecated");
+    output.shouldContain("UseAutoGCSelectPolicy was deprecated in version 9.0");
+    output.shouldContain("AutoGCSelectPauseMillis was deprecated in version 9.0");
     output.shouldNotContain("error");
     output.shouldHaveExitValue(0);
   }