org.openjdk.jcstress.tests.atomicity.varHandles.arrays.CAETest.CompareAndExchangeShort

Tests atomicity of compareAndExchange.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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