--- old/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java 2015-12-01 12:10:59.742920666 +0100 +++ new/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java 2015-12-01 12:10:59.558920672 +0100 @@ -62,7 +62,7 @@ ProcessBuilder pb = ProcessTools. createJavaProcessBuilder( "-XX:+UseConcMarkSweepGC", // this will cause UseParNewGC to be FLAG_SET_ERGO - "-XX:+PrintGCDetails", + "-XX:+UseCodeAging", "-XX:+UseCerealGC", // Should be ignored. "-XX:Flags=" + flagsFile.getAbsolutePath(), "-cp", System.getProperty("test.class.path"), @@ -97,7 +97,7 @@ // Not set, so should be default checkOrigin("ManagementServer", Origin.DEFAULT); // Set on the command line - checkOrigin("PrintGCDetails", Origin.VM_CREATION); + checkOrigin("UseCodeAging", Origin.VM_CREATION); // Set in _JAVA_OPTIONS checkOrigin("TraceExceptions", Origin.ENVIRON_VAR); // Set in JAVA_TOOL_OPTIONS --- old/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java 2015-12-01 12:11:00.026920656 +0100 +++ new/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java 2015-12-01 12:10:59.830920663 +0100 @@ -28,7 +28,7 @@ * @author Mandy Chung * * @modules jdk.management - * @run main/othervm -XX:+PrintGCDetails GetVMOption + * @run main/othervm -XX:+HeapDumpOnOutOfMemoryError GetVMOption */ import com.sun.management.HotSpotDiagnosticMXBean; @@ -38,7 +38,7 @@ import javax.management.MBeanServer; public class GetVMOption { - private static final String PRINT_GC_DETAILS = "PrintGCDetails"; + private static final String HEAP_DUMP_ON_OOM = "HeapDumpOnOutOfMemoryError"; private static final String EXPECTED_VALUE = "true"; private static final String BAD_OPTION = "BadOption"; private static final String HOTSPOT_DIAGNOSTIC_MXBEAN_NAME = @@ -58,7 +58,7 @@ } private static void checkVMOption(HotSpotDiagnosticMXBean mbean) { - VMOption option = mbean.getVMOption(PRINT_GC_DETAILS); + VMOption option = mbean.getVMOption(HEAP_DUMP_ON_OOM); if (!option.getValue().equalsIgnoreCase(EXPECTED_VALUE)) { throw new RuntimeException("Unexpected value: " + option.getValue() + " expected: " + EXPECTED_VALUE); --- old/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java 2015-12-01 12:11:00.318920646 +0100 +++ new/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java 2015-12-01 12:11:00.122920653 +0100 @@ -30,7 +30,7 @@ * @author Jaroslav Bachorik * * @modules jdk.management - * @run main/othervm -XX:+PrintGCDetails SetVMOption + * @run main/othervm -XX:+HeapDumpOnOutOfMemoryError SetVMOption */ import java.lang.management.ManagementFactory; @@ -40,7 +40,7 @@ import com.sun.management.VMOption.Origin; public class SetVMOption { - private static final String PRINT_GC_DETAILS = "PrintGCDetails"; + private static final String HEAP_DUMP_ON_OOM = "HeapDumpOnOutOfMemoryError"; private static final String EXPECTED_VALUE = "true"; private static final String BAD_VALUE = "yes"; private static final String NEW_VALUE = "false"; @@ -51,7 +51,7 @@ mbean = ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class); - VMOption option = findPrintGCDetailsOption(); + VMOption option = findHeapDumpOnOomOption(); if (!option.getValue().equalsIgnoreCase(EXPECTED_VALUE)) { throw new RuntimeException("Unexpected value: " + option.getValue() + " expected: " + EXPECTED_VALUE); @@ -61,14 +61,14 @@ option.getOrigin() + " expected: VM_CREATION"); } if (!option.isWriteable()) { - throw new RuntimeException("Expected " + PRINT_GC_DETAILS + + throw new RuntimeException("Expected " + HEAP_DUMP_ON_OOM + " to be writeable"); } // set VM option to a new value - mbean.setVMOption(PRINT_GC_DETAILS, NEW_VALUE); + mbean.setVMOption(HEAP_DUMP_ON_OOM, NEW_VALUE); - option = findPrintGCDetailsOption(); + option = findHeapDumpOnOomOption(); if (!option.getValue().equalsIgnoreCase(NEW_VALUE)) { throw new RuntimeException("Unexpected value: " + option.getValue() + " expected: " + NEW_VALUE); @@ -77,7 +77,7 @@ throw new RuntimeException("Unexpected origin: " + option.getOrigin() + " expected: MANAGEMENT"); } - VMOption o = mbean.getVMOption(PRINT_GC_DETAILS); + VMOption o = mbean.getVMOption(HEAP_DUMP_ON_OOM); if (!option.getValue().equals(o.getValue())) { throw new RuntimeException("Unmatched value: " + option.getValue() + " expected: " + o.getValue()); @@ -123,17 +123,17 @@ } } - public static VMOption findPrintGCDetailsOption() { + public static VMOption findHeapDumpOnOomOption() { List options = mbean.getDiagnosticOptions(); VMOption gcDetails = null; for (VMOption o : options) { - if (o.getName().equals(PRINT_GC_DETAILS)) { + if (o.getName().equals(HEAP_DUMP_ON_OOM)) { gcDetails = o; break; } } if (gcDetails == null) { - throw new RuntimeException("VM option " + PRINT_GC_DETAILS + + throw new RuntimeException("VM option " + HEAP_DUMP_ON_OOM + " not found"); } return gcDetails; --- old/test/java/lang/management/MemoryMXBean/LowMemoryTest.java 2015-12-01 12:11:00.606920636 +0100 +++ new/test/java/lang/management/MemoryMXBean/LowMemoryTest.java 2015-12-01 12:11:00.402920643 +0100 @@ -100,7 +100,7 @@ opts.addAll(Arrays.asList(Utils.getTestJavaOpts())); opts.add("-cp"); opts.add(System.getProperty("test.class.path", "test.class.path")); - opts.add("-XX:+PrintGCDetails"); + opts.add("-Xlog:gc*=debug"); opts.addAll(Arrays.asList(testOpts)); opts.add(classMain); --- old/test/java/lang/management/MemoryMXBean/RunUtil.java 2015-12-01 12:11:00.894920626 +0100 +++ new/test/java/lang/management/MemoryMXBean/RunUtil.java 2015-12-01 12:11:00.690920633 +0100 @@ -66,7 +66,7 @@ opts.addAll(Arrays.asList(Utils.getTestJavaOpts())); opts.add("-cp"); opts.add(System.getProperty("test.class.path", "test.class.path")); - opts.add("-XX:+PrintGCDetails"); + opts.add("-Xlog:gc*=debug"); if (clearGcOpts) { opts = Utils.removeGcOpts(opts); --- old/test/java/lang/management/RuntimeMXBean/TestInputArgument.sh 2015-12-01 12:11:01.178920616 +0100 +++ new/test/java/lang/management/RuntimeMXBean/TestInputArgument.sh 2015-12-01 12:11:00.986920622 +0100 @@ -48,8 +48,8 @@ runOne InputArgument -runOne -XX:+UseFastJNIAccessors -XX:+PrintGCDetails InputArgument -XX:+PrintGCDetails -runOne -XX:+UseFastJNIAccessors -XX:+PrintGCDetails InputArgument -XX:+UseFastJNIAccessors +runOne -XX:+UseFastJNIAccessors -Xlog:gc*=debug InputArgument +runOne -XX:+UseFastJNIAccessors -Xlog:gc*=debug InputArgument -XX:+UseFastJNIAccessors runOne "-Dprops=one two three" InputArgument "-Dprops=one two three" exit 0 --- old/test/java/text/Format/DecimalFormat/FormatMicroBenchmark.java 2015-12-01 12:11:01.474920605 +0100 +++ new/test/java/text/Format/DecimalFormat/FormatMicroBenchmark.java 2015-12-01 12:11:01.266920613 +0100 @@ -51,7 +51,7 @@ * getting reliable numbers. Otherwise GC activity may corrupt results. * As of jdk80b48 using "-Xms500m -Xmx500m -XX:NewSize=400m" covers * all cases. - * - Optionally using "-XX:+printGC" option provides information that + * - Optionally using "-Xlog:gc" option provides information that * helps checking any GC activity while benches are run. * * Vm Options: @@ -60,7 +60,7 @@ * non fast-path case: -Xms500m -Xmx500m -XX:NewSize=400m * or use worst case (non fast-path above) with both types of algorithm. * - * - use -XX:+PrintGC to verify memory consumption of the benchmarks. + * - use -Xlog:gc to verify memory consumption of the benchmarks. * (See "Checking Memory Consumption" below). * * Description: @@ -166,7 +166,7 @@ * but is not enough, since any unexpected incremental GC may lower * artificially the estimation of the memory consumption. * - * Options to set are -Xms, -Xmx, -XX:NewSize, plus -XX:+PrintGC to evaluate + * Options to set are -Xms, -Xmx, -XX:NewSize, plus -Xlog:gc to evaluate * correctly the values of these options. When running "-verbose", varying * numbers reported for memory consumption may indicate bad choices for these * options. @@ -217,7 +217,7 @@ " getting reliable numbers. Otherwise GC activity may corrupt results.\n" + " As of jdk80b48 using \"-Xms500m -Xmx500m -XX:NewSize=400m\" covers \n" + " all cases.\n" + - " - Optionally using \"-XX:+printGC\" option provides information that \n" + + " - Optionally using \"-Xlog:gc\" option provides information that \n" + " helps checking any GC activity while benches are run.\n\n" + "Look at the heading comments and description in source code for " + "detailed information.\n"); --- old/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java 2015-12-01 12:11:01.802920594 +0100 +++ new/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java 2015-12-01 12:11:01.578920602 +0100 @@ -38,8 +38,7 @@ *
  * {@code
  * JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
- *                                       .addVMArg("-XX:+PrintGC");
- *                                       .addVMArg("-XX:+PrintGCDetails")
+ *                                       .addVMArg("-Xlog:gc*=debug")
  *                                       .addToolArg("-heap")
  *                                       .addToolArg(pid);
  * ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
--- old/test/sun/tools/jinfo/JInfoRunningProcessFlagTest.java	2015-12-01 12:11:02.086920584 +0100
+++ new/test/sun/tools/jinfo/JInfoRunningProcessFlagTest.java	2015-12-01 12:11:01.878920591 +0100
@@ -60,30 +60,30 @@
     }
 
     private static void testFlagPlus() throws Exception {
-        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "+PrintGC");
+        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "+HeapDumpOnOutOfMemoryError");
         output.shouldHaveExitValue(0);
-        output = JInfoHelper.jinfo("-flag", "PrintGC");
+        output = JInfoHelper.jinfo("-flag", "HeapDumpOnOutOfMemoryError");
         output.shouldHaveExitValue(0);
-        output.shouldContain("+PrintGC");
-        verifyIsEnabled("PrintGC");
+        output.shouldContain("+HeapDumpOnOutOfMemoryError");
+        verifyIsEnabled("HeapDumpOnOutOfMemoryError");
     }
 
     private static void testFlagMinus() throws Exception {
-        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "-PrintGC");
+        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "-HeapDumpOnOutOfMemoryError");
         output.shouldHaveExitValue(0);
-        output = JInfoHelper.jinfo("-flag", "PrintGC");
+        output = JInfoHelper.jinfo("-flag", "HeapDumpOnOutOfMemoryError");
         output.shouldHaveExitValue(0);
-        output.shouldContain("-PrintGC");
-        verifyIsDisabled("PrintGC");
+        output.shouldContain("-HeapDumpOnOutOfMemoryError");
+        verifyIsDisabled("HeapDumpOnOutOfMemoryError");
     }
 
     private static void testFlagEqual() throws Exception {
-        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "PrintGC=1");
+        OutputAnalyzer output = JInfoHelper.jinfo("-flag", "HeapDumpOnOutOfMemoryError=1");
         output.shouldHaveExitValue(0);
-        output = JInfoHelper.jinfo("-flag", "PrintGC");
+        output = JInfoHelper.jinfo("-flag", "HeapDumpOnOutOfMemoryError");
         output.shouldHaveExitValue(0);
-        output.shouldContain("+PrintGC");
-        verifyIsEnabled("PrintGC");
+        output.shouldContain("+HeapDumpOnOutOfMemoryError");
+        verifyIsEnabled("HeapDumpOnOutOfMemoryError");
     }
 
     private static void testInvalidFlag() throws Exception {
--- old/test/sun/tools/jps/JpsHelper.java	2015-12-01 12:11:02.374920574 +0100
+++ new/test/sun/tools/jps/JpsHelper.java	2015-12-01 12:11:02.166920581 +0100
@@ -98,7 +98,7 @@
      * -XX:+UsePerfData is required for running the tests on embedded platforms.
      */
     public static final String[] VM_ARGS = {
-        "-XX:+UsePerfData", "-Xmx512m", "-XX:+PrintGCDetails",
+        "-XX:+UsePerfData", "-Xmx512m", "-Xlog:gc",
         "-Dmultiline.prop=value1\nvalue2\r\nvalue3"
     };
     /**