< prev index next >
test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 127,155 ****
public static final long rL = Utils.getRandomInstance().nextLong() % 1000;
// User defined settings
protected static final boolean XCOMP = Platform.isComp();
private static final boolean PRINT_GRAPH = true;
! protected static final boolean VERBOSE = Boolean.parseBoolean(System.getProperty("Verbose", "false"));
private static final boolean PRINT_TIMES = Boolean.parseBoolean(System.getProperty("PrintTimes", "false"));
! private static boolean VERIFY_IR = Boolean.parseBoolean(System.getProperty("VerifyIR", "true")) && !XCOMP && !TEST_C1;
private static final boolean VERIFY_VM = Boolean.parseBoolean(System.getProperty("VerifyVM", "false"));
private static final String SCENARIOS = System.getProperty("Scenarios", "");
private static final String TESTLIST = System.getProperty("Testlist", "");
private static final String EXCLUDELIST = System.getProperty("Exclude", "");
private static final int WARMUP = Integer.parseInt(System.getProperty("Warmup", "251"));
private static final boolean DUMP_REPLAY = Boolean.parseBoolean(System.getProperty("DumpReplay", "false"));
! protected static final boolean FLIP_C1_C2 = Boolean.parseBoolean(System.getProperty("FlipC1C2", "false"));
! protected static final boolean GCAfter = Boolean.parseBoolean(System.getProperty("GCAfter", "false"));
! private static final int OSRTestTimeOut = Integer.parseInt(System.getProperty("OSRTestTimeOut", "5000"));
// "jtreg -DXcomp=true" runs all the scenarios with -Xcomp. This is faster than "jtreg -javaoptions:-Xcomp".
protected static final boolean RUN_SCENARIOS_WITH_XCOMP = Boolean.parseBoolean(System.getProperty("Xcomp", "false"));
// Pre-defined settings
private static final String[] defaultFlags = {
! "-XX:-BackgroundCompilation",
"-XX:CompileCommand=quiet",
"-XX:CompileCommand=compileonly,java.lang.invoke.*::*",
"-XX:CompileCommand=compileonly,java.lang.Long::sum",
"-XX:CompileCommand=compileonly,java.lang.Object::<init>",
"-XX:CompileCommand=inline,compiler.valhalla.valuetypes.MyValue*::<init>",
--- 127,157 ----
public static final long rL = Utils.getRandomInstance().nextLong() % 1000;
// User defined settings
protected static final boolean XCOMP = Platform.isComp();
private static final boolean PRINT_GRAPH = true;
! private static final boolean VERBOSE = Boolean.parseBoolean(System.getProperty("Verbose", "false"));
private static final boolean PRINT_TIMES = Boolean.parseBoolean(System.getProperty("PrintTimes", "false"));
! private static final boolean COMPILE_COMMANDS = Boolean.parseBoolean(System.getProperty("CompileCommands", "true"));
! private static boolean VERIFY_IR = Boolean.parseBoolean(System.getProperty("VerifyIR", "true")) && !XCOMP && !TEST_C1 && COMPILE_COMMANDS;
private static final boolean VERIFY_VM = Boolean.parseBoolean(System.getProperty("VerifyVM", "false"));
private static final String SCENARIOS = System.getProperty("Scenarios", "");
private static final String TESTLIST = System.getProperty("Testlist", "");
private static final String EXCLUDELIST = System.getProperty("Exclude", "");
private static final int WARMUP = Integer.parseInt(System.getProperty("Warmup", "251"));
private static final boolean DUMP_REPLAY = Boolean.parseBoolean(System.getProperty("DumpReplay", "false"));
! private static final boolean FLIP_C1_C2 = Boolean.parseBoolean(System.getProperty("FlipC1C2", "false"));
! private static final boolean GC_AFTER = Boolean.parseBoolean(System.getProperty("GCAfter", "false"));
! private static final int OSR_TEST_TIMEOUT = Integer.parseInt(System.getProperty("OSRTestTimeOut", "5000"));
// "jtreg -DXcomp=true" runs all the scenarios with -Xcomp. This is faster than "jtreg -javaoptions:-Xcomp".
protected static final boolean RUN_SCENARIOS_WITH_XCOMP = Boolean.parseBoolean(System.getProperty("Xcomp", "false"));
// Pre-defined settings
private static final String[] defaultFlags = {
! "-XX:-BackgroundCompilation"};
! private static final String[] compileCommandFlags = {
"-XX:CompileCommand=quiet",
"-XX:CompileCommand=compileonly,java.lang.invoke.*::*",
"-XX:CompileCommand=compileonly,java.lang.Long::sum",
"-XX:CompileCommand=compileonly,java.lang.Object::<init>",
"-XX:CompileCommand=inline,compiler.valhalla.valuetypes.MyValue*::<init>",
*** 431,440 ****
--- 433,443 ----
// vmInputArgs, which consists of:
// @run options
// getVMParameters()
// getExtraVMParameters()
// defaultFlags
+ // compileCommandFlags
String cmds[] = null;
if (VERIFY_IR) {
// Add print flags for IR verification
cmds = concat(cmds, printFlags);
// Always trap for exception throwing to not confuse IR verification
*** 443,452 ****
--- 446,458 ----
if (VERIFY_VM) {
cmds = concat(cmds, verifyFlags);
}
cmds = concat(cmds, vmInputArgs);
cmds = concat(cmds, defaultFlags);
+ if (COMPILE_COMMANDS) {
+ cmds = concat(cmds, compileCommandFlags);
+ }
// Run tests in own process and verify output
cmds = concat(cmds, getClass().getName(), "run");
OutputAnalyzer oa = ProcessTools.executeTestJvm(cmds);
// If ideal graph printing is enabled/supported, verify output
*** 697,707 ****
}
if (b || XCOMP || !USE_COMPILER) {
// Don't control compilation if -Xcomp is enabled, or if compiler is disabled
break;
}
! Asserts.assertTrue(OSRTestTimeOut < 0 || elapsed < OSRTestTimeOut, test + " not compiled after " + OSRTestTimeOut + " ms");
}
if (!XCOMP) {
Asserts.assertTrue(!USE_COMPILER || WHITE_BOX.isMethodCompiled(test, false), test + " not compiled");
}
} else {
--- 703,713 ----
}
if (b || XCOMP || !USE_COMPILER) {
// Don't control compilation if -Xcomp is enabled, or if compiler is disabled
break;
}
! Asserts.assertTrue(OSR_TEST_TIMEOUT < 0 || elapsed < OSR_TEST_TIMEOUT, test + " not compiled after " + OSR_TEST_TIMEOUT + " ms");
}
if (!XCOMP) {
Asserts.assertTrue(!USE_COMPILER || WHITE_BOX.isMethodCompiled(test, false), test + " not compiled");
}
} else {
*** 725,735 ****
durations.put(duration, test.getName());
if (VERBOSE) {
System.out.println("Done " + test.getName() + ": " + duration + " ns = " + (duration / 1000000) + " ms");
}
}
! if (GCAfter) {
System.out.println("doing GC");
System.gc();
}
}
--- 731,741 ----
durations.put(duration, test.getName());
if (VERBOSE) {
System.out.println("Done " + test.getName() + ": " + duration + " ns = " + (duration / 1000000) + " ms");
}
}
! if (GC_AFTER) {
System.out.println("doing GC");
System.gc();
}
}
< prev index next >