8255011: [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out
Change CodeCacheStressRunner to have a 60 second test time Reviewed-by: iignatyev
This commit is contained in:
parent
c601849e00
commit
e281b13597
@ -28,6 +28,7 @@ import jdk.test.lib.Utils;
|
|||||||
|
|
||||||
public class CodeCacheStressRunner {
|
public class CodeCacheStressRunner {
|
||||||
private final Runnable action;
|
private final Runnable action;
|
||||||
|
|
||||||
public CodeCacheStressRunner(Runnable action) {
|
public CodeCacheStressRunner(Runnable action) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
}
|
}
|
||||||
@ -35,10 +36,8 @@ public class CodeCacheStressRunner {
|
|||||||
protected final void runTest() {
|
protected final void runTest() {
|
||||||
Helper.startInfiniteLoopThread(action);
|
Helper.startInfiniteLoopThread(action);
|
||||||
try {
|
try {
|
||||||
// adjust timeout and substract vm init and exit time
|
// Adjust timeout and substract vm init and exit time
|
||||||
long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
|
new TimeLimitedRunner(60 * 1000, 2.0d, this::test).call();
|
||||||
timeout *= 0.8;
|
|
||||||
new TimeLimitedRunner(timeout, 2.0d, this::test).call();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new Error("Exception occurred during test execution", e);
|
throw new Error("Exception occurred during test execution", e);
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,13 @@ public class UnexpectedDeoptimizationTest implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean());
|
Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean());
|
||||||
|
// Sleep a short while to allow the stacks to grow - otherwise
|
||||||
|
// we end up running almost all code in the interpreter
|
||||||
|
try {
|
||||||
|
Thread.sleep(10);
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user