8151880: EnqueueMethodForCompilationTest.java still fails to compile method

Extract SimpleTestCaseHelper inner class

Reviewed-by: kvn
This commit is contained in:
Nils Eliasson 2016-04-06 14:48:45 +02:00
parent 7502a7a7f2
commit c70e07ccbe
12 changed files with 81 additions and 71 deletions

View file

@ -24,6 +24,7 @@ package compiler.whitebox;
import sun.hotspot.WhiteBox;
import sun.hotspot.code.NMethod;
import java.lang.reflect.Executable;
import java.util.Objects;
import java.util.concurrent.Callable;
@ -58,6 +59,8 @@ public abstract class CompilerWhiteBoxTest {
/** Value of {@code -XX:BackgroundCompilation} */
protected static final boolean BACKGROUND_COMPILATION
= Boolean.valueOf(getVMOption("BackgroundCompilation", "true"));
protected static final boolean USE_COUNTER_DECAY
= Boolean.valueOf(getVMOption("UseCounterDecay", "true"));
/** Value of {@code -XX:TieredCompilation} */
protected static final boolean TIERED_COMPILATION
= Boolean.valueOf(getVMOption("TieredCompilation", "false"));
@ -370,7 +373,10 @@ public abstract class CompilerWhiteBoxTest {
* @return accumulated result
* @see #compile(int)
*/
protected final int compile() {
protected final int compile() throws Exception {
if (USE_COUNTER_DECAY) {
throw new Exception("Tests using compile method must turn off counter decay for reliability");
}
if (testCase.isOsr()) {
return compile(1);
} else {