hotspot/test/compiler/onSpinWait/TestOnSpinWait.java checks that Thread::onSpinWait is intrinsified on x86, we need tests which checks that Thread::onSpinWait works fine on non-x86 platforms. there is a test proposed by [~psandoz]:
On Mar 29, 2016, at 10:40 AM, Paul Sandoz wrote:
...
We can add another test to the webrev e.g. TestOnSpinWaitBasic:
// Test Thread.OnSpingWait can be called
public class TestOnSpinWaitBasic {
public static void main(String[] args) {
for (int i = 0; i < 50_000; i++) {
java.lang.Thread.onSpinWait();
}
}
}
And we can run that with the intrinsic enabled and disabled.
Paul.
On Mar 29, 2016, at 10:40 AM, Paul Sandoz wrote:
...
We can add another test to the webrev e.g. TestOnSpinWaitBasic:
// Test Thread.OnSpingWait can be called
public class TestOnSpinWaitBasic {
public static void main(String[] args) {
for (int i = 0; i < 50_000; i++) {
java.lang.Thread.onSpinWait();
}
}
}
And we can run that with the intrinsic enabled and disabled.
Paul.
- blocks
-
JDK-8147832 JEP 285: Spin-Wait Hints
-
- Closed
-