8038947: HotSpotDiagnosticMXBean/CheckOrigin.java 'NewSize' should have origin 'ERGONOMIC' but had 'DEFAULT'
authorsla
Fri, 25 Apr 2014 08:55:34 +0200
changeset 24117 19c6d44b6550
parent 24116 9f9b4ba34aad
child 24118 e77215028389
8038947: HotSpotDiagnosticMXBean/CheckOrigin.java 'NewSize' should have origin 'ERGONOMIC' but had 'DEFAULT' Reviewed-by: mchung, jbachorik
jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Fri Apr 25 10:57:09 2014 +0800
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Fri Apr 25 08:55:34 2014 +0200
@@ -58,6 +58,7 @@
 
             ProcessBuilder pb = ProcessTools.
                 createJavaProcessBuilder(
+                    "-XX:+UseConcMarkSweepGC",  // this will cause UseParNewGC to be FLAG_SET_ERGO
                     "-XX:+PrintGCDetails",
                     "-XX:Flags=" + flagsFile.getAbsolutePath(),
                     "-cp", System.getProperty("test.class.path") + File.pathSeparator + getToolsJarPath(),
@@ -84,12 +85,20 @@
             setOptionUsingAttach("HeapDumpPath", "/a/sample/path");
 
             // check the origin field for all the options we set
+
+            // Not set, so should be default
             checkOrigin("ManagementServer", Origin.DEFAULT);
+            // Set on the command line
             checkOrigin("PrintGCDetails", Origin.VM_CREATION);
+            // Set in _JAVA_OPTIONS
             checkOrigin("PrintOopAddress", Origin.ENVIRON_VAR);
+            // Set in -XX:Flags file
             checkOrigin("PrintSafepointStatistics", Origin.CONFIG_FILE);
+            // Set through j.l.m
             checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT);
-            checkOrigin("NewSize", Origin.ERGONOMIC);
+            // Should be set by the VM, when we set UseConcMarkSweepGC
+            checkOrigin("UseParNewGC", Origin.ERGONOMIC);
+            // Set using attach
             checkOrigin("HeapDumpPath", Origin.ATTACH_ON_DEMAND);
         }
     }