org.openjdk.jcstress.tests.atomicity.varHandles.byteBuffer.direct.little.CAETest.CompareAndExchangeInt

Tests atomicity of compareAndExchange.

JVM options: [-server, -XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 117482 ACCEPTABLE actor2 update successfully
0, -1, -1 370558 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-server, -XX:-TieredCompilation] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 7559 ACCEPTABLE actor2 update successfully
0, -1, -1 40131 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-XX:TieredStopAtLevel=1] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 15648 ACCEPTABLE actor2 update successfully
0, -1, -1 121082 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-server] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 34225 ACCEPTABLE actor2 update successfully
0, -1, -1 236185 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-server, -XX:-TieredCompilation, -XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 54270 ACCEPTABLE actor2 update successfully
0, -1, -1 224940 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-client, -XX:-TieredCompilation] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 96253 ACCEPTABLE actor2 update successfully
0, -1, -1 336647 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-Xint] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 21803 ACCEPTABLE actor2 update successfully
0, -1, -1 9667 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic

JVM options: [-client] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 55801 ACCEPTABLE actor2 update successfully
0, -1, -1 126979 ACCEPTABLE actor1 update successfully
0, 0, -1 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, -2 0 FORBIDDEN This won't happen because compareAndExchange is atomic
0, 0, 0 0 FORBIDDEN This won't happen because compareAndExchange is atomic