changeset 12155:f5fd57f23732

8167494: Deprecate AutoGCSelectPauseMillis Reviewed-by: kbarrett, ehelin
author sangheki
date Mon, 17 Oct 2016 16:40:49 -0700
parents a44e1708bb9f
children f482f393222d be080d1a870c
files src/share/vm/runtime/arguments.cpp test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Mon Oct 17 21:21:53 2016 -0700
+++ b/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/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java	Mon Oct 17 21:21:53 2016 -0700
+++ b/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);
   }