< prev index next > test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java
Print this page
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,
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 >