< prev index next >

test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java

Print this page

        

@@ -61,17 +61,22 @@
 
             ProcessBuilder pb = ProcessTools.
                 createJavaProcessBuilder(
                     "-XX:+UseConcMarkSweepGC",  // this will cause UseParNewGC to be FLAG_SET_ERGO
                     "-XX:+PrintGCDetails",
+                    "-XX:+UseCerealGC",         // Should be ignored.
                     "-XX:Flags=" + flagsFile.getAbsolutePath(),
                     "-cp", System.getProperty("test.class.path"),
                     "CheckOrigin",
                     "-runtests");
 
             Map<String, String> env = pb.environment();
-            env.put("_JAVA_OPTIONS", "-XX:+PrintOopAddress");
+            // "UseCMSGC" should be ignored.
+            env.put("_JAVA_OPTIONS", "-XX:+TraceExceptions -XX:+UseCMSGC");
+            // "UseGOneGC" should be ignored.
+            env.put("JAVA_TOOL_OPTIONS", "-XX:+IgnoreUnrecognizedVMOptions "
+                + "-XX:+PrintVMOptions -XX:+UseGOneGC");
 
             pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);
             pb.redirectError(ProcessBuilder.Redirect.INHERIT);
             Process p = pb.start();
             int exit = p.waitFor();

@@ -92,11 +97,14 @@
             // 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);
+            checkOrigin("TraceExceptions", Origin.ENVIRON_VAR);
+            // Set in JAVA_TOOL_OPTIONS
+            checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR);
+            checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR);
             // Set in -XX:Flags file
             checkOrigin("PrintSafepointStatistics", Origin.CONFIG_FILE);
             // Set through j.l.m
             checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT);
             // Should be set by the VM, when we set UseConcMarkSweepGC
< prev index next >