< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java

Print this page
@@ -74,20 +74,22 @@
          ProcessBuilder pb;
          OutputAnalyzer out;
  
          // first make sure we have a valid aotConfigFile with default value of TypeProfileLevel
          pb = ProcessTools.createLimitedTestJavaProcessBuilder(
+             "-Xlog:aot",
              "-XX:AOTMode=record",
              "-XX:AOTConfiguration=" + aotConfigFile,
              "-XX:+UnlockExperimentalVMOptions",
              trainingFlags,
              "-cp", appJar, helloClass);
  
          out = CDSTestUtils.executeAndLog(pb, "train");
          out.shouldHaveExitValue(0);
  
          pb = ProcessTools.createLimitedTestJavaProcessBuilder(
+             "-Xlog:aot",
              "-XX:AOTMode=create",
              "-XX:AOTConfiguration=" + aotConfigFile,
              "-XX:AOTCache=" + aotCacheFile,
              "-XX:+UnlockExperimentalVMOptions",
              trainingFlags,

@@ -95,28 +97,30 @@
  
          out = CDSTestUtils.executeAndLog(pb, "assemble");
          out.shouldHaveExitValue(0);
  
          pb = ProcessTools.createLimitedTestJavaProcessBuilder(
+             "-Xlog:aot",
              "-XX:AOTCache=" + aotCacheFile,
              "-XX:+UnlockExperimentalVMOptions",
              trainingFlags,
              "-cp", appJar, helloClass);
  
          out = CDSTestUtils.executeAndLog(pb, "production_success");
          out.shouldNotMatch(errorPattern);
          out.shouldHaveExitValue(0);
  
          pb = ProcessTools.createLimitedTestJavaProcessBuilder(
+             "-Xlog:aot",
              "-XX:AOTCache=" + aotCacheFile,
              "-XX:+UnlockExperimentalVMOptions",
              productionFlags,
              "-cp", appJar, helloClass);
  
          out = CDSTestUtils.executeAndLog(pb, "production_failure");
          out.shouldMatch(errorPattern);
-         out.shouldHaveExitValue(0);
+         out.shouldHaveExitValue(1); // RequireSharedSpaces is on in premain
      }
  
      public static void testFlagsMismatch() throws Exception {
          String errorPattern = ".*Profile.* setting .* does not equal the current .*Profile.* setting.*";
          trainAndRun("TypeProfileLevel", "-XX:TypeProfileLevel=222", "-XX:TypeProfileLevel=111", errorPattern);
< prev index next >