org.openjdk.jcstress.tests.atomicity.varHandles.byteArray.big.CAETest.CompareAndExchangeLong

Tests atomicity of compareAndExchange.

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

Observed state Occurrence Expectation Interpretation
-2, 0, -2 74460 ACCEPTABLE actor2 update successfully
0, -1, -1 385800 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 31919 ACCEPTABLE actor2 update successfully
0, -1, -1 29971 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 167341 ACCEPTABLE actor2 update successfully
0, -1, -1 960469 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:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM] Iterations: 5 Time: 200

Observed state Occurrence Expectation Interpretation
-2, 0, -2 192743 ACCEPTABLE actor2 update successfully
0, -1, -1 629827 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 144116 ACCEPTABLE actor2 update successfully
0, -1, -1 776444 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 130027 ACCEPTABLE actor2 update successfully
0, -1, -1 883483 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 184770 ACCEPTABLE actor2 update successfully
0, -1, -1 344390 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 152419 ACCEPTABLE actor2 update successfully
0, -1, -1 333091 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