< prev index next >
test/compiler/valhalla/valuetypes/ValueTypeTestBench.java
Print this page
rev 10493 : keep
rev 10513 : fix incremental inlining with value types
@@ -28,10 +28,11 @@
* @library /testlibrary /test/lib /compiler/whitebox /
* @build compiler.valhalla.valuetypes.ValueTypeTestBench
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main ClassFileInstaller jdk.test.lib.Platform
* @run main/othervm -ea -noverify -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
+ * -XX:+UnlockExperimentalVMOptions -XX:+ValueTypePassFieldsAsArgs
* -XX:-TieredCompilation compiler.valhalla.valuetypes.ValueTypeTestBench
* @run main/othervm -ea -noverify -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UnlockExperimentalVMOptions -XX:-ValueTypePassFieldsAsArgs
* -XX:-TieredCompilation compiler.valhalla.valuetypes.ValueTypeTestBench
*/
@@ -811,28 +812,22 @@
tests.put("ValueTypeTestBench::" + m.getName(), m);
}
}
}
- public static void main(String[] args) throws Throwable {
- if (args.length == 0) {
+ private static void execute_vm(String... extra_args) throws Throwable {
ArrayList<String> all_args = new ArrayList(List.of(
"-noverify",
"-XX:+UnlockDiagnosticVMOptions", "-Xbootclasspath/a:.", "-XX:+WhiteBoxAPI",
"-XX:-TieredCompilation", "-XX:-BackgroundCompilation",
"-XX:+IgnoreUnrecognizedVMOptions", "-XX:+PrintCompilation", "-XX:+PrintIdeal", "-XX:+PrintOptoAssembly",
"-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.ValueTypeTestBench::*",
"-XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.MyValue1::*",
"-XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.MyValue2::*"
));
+ all_args.addAll(List.of(extra_args));
// Run tests in own process and verify output
- all_args.add("-XX:+UnlockExperimentalVMOptions");
- if ((Boolean)WHITE_BOX.getVMFlag("ValueTypePassFieldsAsArgs")) {
- all_args.add("-XX:+ValueTypePassFieldsAsArgs");
- } else {
- all_args.add("-XX:-ValueTypePassFieldsAsArgs");
- }
all_args.add(ValueTypeTestBench.class.getName());
all_args.add("run");
OutputAnalyzer oa = ProcessTools.executeTestJvm(all_args.toArray(new String[0]));
// If ideal graph printing is enabled/supported, verify output
String output = oa.getOutput();
@@ -840,10 +835,22 @@
if (output.contains("PrintIdeal enabled")) {
parseOutput(output);
} else {
System.out.println("WARNING: IR verification disabled! Running with -Xint, -Xcomp or release build?");
}
+ }
+
+ public static void main(String[] args) throws Throwable {
+ if (args.length == 0) {
+ String field_as_args;
+ if ((Boolean)WHITE_BOX.getVMFlag("ValueTypePassFieldsAsArgs")) {
+ field_as_args = "-XX:+ValueTypePassFieldsAsArgs";
+ } else {
+ field_as_args = "-XX:-ValueTypePassFieldsAsArgs";
+ }
+ execute_vm("-XX:+UnlockExperimentalVMOptions", field_as_args);
+ execute_vm("-XX:+AlwaysIncrementalInline", "-XX:+UnlockExperimentalVMOptions", field_as_args);
} else {
if (USE_COMPILER && PRINT_IDEAL && !XCOMP) {
System.out.println("PrintIdeal enabled");
}
// Execute tests
< prev index next >