test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
changeset 50892 a5557f24b4d4
parent 50455 2b73cce96dce
child 51675 b487c1e914d0
equal deleted inserted replaced
50891:9948ea5ea1af 50892:a5557f24b4d4
    56             // start a process that has options set in a number of different ways
    56             // start a process that has options set in a number of different ways
    57 
    57 
    58             File flagsFile = File.createTempFile("CheckOriginFlags", null);
    58             File flagsFile = File.createTempFile("CheckOriginFlags", null);
    59             try (PrintWriter pw =
    59             try (PrintWriter pw =
    60                    new PrintWriter(new FileWriter(flagsFile))) {
    60                    new PrintWriter(new FileWriter(flagsFile))) {
    61                 pw.println("+PrintSafepointStatistics");
    61                 pw.println("+PrintVMQWaitTime");
    62             }
    62             }
    63 
    63 
    64             ProcessBuilder pb = ProcessTools.
    64             ProcessBuilder pb = ProcessTools.
    65                 createJavaProcessBuilder(
    65                 createJavaProcessBuilder(
    66                     "--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED",
    66                     "--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED",
   106             checkOrigin("CheckJNICalls", Origin.ENVIRON_VAR);
   106             checkOrigin("CheckJNICalls", Origin.ENVIRON_VAR);
   107             // Set in JAVA_TOOL_OPTIONS
   107             // Set in JAVA_TOOL_OPTIONS
   108             checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR);
   108             checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR);
   109             checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR);
   109             checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR);
   110             // Set in -XX:Flags file
   110             // Set in -XX:Flags file
   111             checkOrigin("PrintSafepointStatistics", Origin.CONFIG_FILE);
   111             checkOrigin("PrintVMQWaitTime", Origin.CONFIG_FILE);
   112             // Set through j.l.m
   112             // Set through j.l.m
   113             checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT);
   113             checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT);
   114             // Should be set by the VM, when we set UseConcMarkSweepGC
   114             // Should be set by the VM, when we set UseConcMarkSweepGC
   115             checkOrigin("MaxNewSize", Origin.ERGONOMIC);
   115             checkOrigin("MaxNewSize", Origin.ERGONOMIC);
   116             // Set using attach
   116             // Set using attach