8337060: Test java/foreign/TestConcurrentClose.java failed: IllegalStateException: SegmentAccessor::doAccess method not being compiled

Reviewed-by: mcimadamore, alanb
This commit is contained in:
Jorn Vernee 2024-07-25 16:36:31 +00:00
parent e74edbaea9
commit 81ed028717

@ -36,6 +36,7 @@
* -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
* -XX:CompileCommand=dontinline,TestConcurrentClose$SegmentAccessor::doAccess
* -Xbatch
* TestConcurrentClose
*/
@ -71,7 +72,7 @@ public class TestConcurrentClose {
static final int ITERATIONS = 5;
static final int SEGMENT_SIZE = 10_000;
static final int MAX_EXECUTOR_WAIT_SECONDS = 20;
static final int MAX_EXECUTOR_WAIT_SECONDS = 60;
static final int NUM_ACCESSORS = 50;
static final AtomicLong start = new AtomicLong();
@ -176,13 +177,8 @@ public class TestConcurrentClose {
}
private static void awaitCompilation() throws InterruptedException {
int retries = 0;
while (WB.getMethodCompilationLevel(DO_ACCESS_METHOD, false) != C2_COMPILED_LEVEL) {
if (retries > 20) {
throw new IllegalStateException("SegmentAccessor::doAccess method not being compiled");
}
Thread.sleep(1000);
retries++;
}
}
}