Skip to content

Commit cf3ec2c

Browse files
author
Nils Eliasson
committed
8255011: UnexpectedDeoptimizationAllTest.java timed out
1 parent 9b1eebc commit cf3ec2c

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

test/hotspot/jtreg/compiler/codecache/stress/CodeCacheStressRunner.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,21 @@
2727
import jdk.test.lib.Utils;
2828

2929
public class CodeCacheStressRunner {
30+
private static long end_time;
3031
private final Runnable action;
32+
3133
public CodeCacheStressRunner(Runnable action) {
3234
this.action = action;
3335
}
3436

3537
protected final void runTest() {
3638
Helper.startInfiniteLoopThread(action);
3739
try {
38-
// adjust timeout and substract vm init and exit time
40+
// Adjust timeout and substract vm init and exit time
41+
// Runs with fixed workload that is capped by the TimeLimitedRunner
42+
end_time = System.nanoTime() + 60 * 1000 * 1000 * 1000L;
3943
long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
40-
timeout *= 0.8;
44+
timeout *= 0.75;
4145
new TimeLimitedRunner(timeout, 2.0d, this::test).call();
4246
} catch (Exception e) {
4347
throw new Error("Exception occurred during test execution", e);
@@ -47,7 +51,7 @@ protected final void runTest() {
4751
private boolean test() {
4852
Helper.TestCase obj = Helper.TestCase.get();
4953
Helper.callMethod(obj.getCallable(), obj.expectedValue());
50-
return true;
54+
return end_time > System.nanoTime();
5155
}
5256

5357
}

test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static void main(String[] args) {
5757
public void run() {
5858
Helper.WHITE_BOX.deoptimizeAll();
5959
try {
60-
Thread.sleep(10);
60+
Thread.sleep(100);
6161
} catch (Exception e) {
6262
}
6363
}

test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public static void main(String[] args) {
6060
@Override
6161
public void run() {
6262
Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean());
63+
try {
64+
Thread.sleep(10);
65+
} catch (Exception e) {
66+
}
67+
6368
}
6469

6570
}

0 commit comments

Comments
 (0)