org.openjdk.jcstress.tests.atomicity.varHandles.fields.CAETest.CompareAndExchangeAcquireShort

Tests atomicity of compareAndExchange.

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 420622 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 194278 ACCEPTABLE actor2 update successfully

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 653977 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 377653 ACCEPTABLE actor2 update successfully

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 962474 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 373056 ACCEPTABLE actor2 update successfully

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 26504 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 21436 ACCEPTABLE actor2 update successfully

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 266549 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 129891 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 409548 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 124452 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 955841 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 600899 ACCEPTABLE actor2 update successfully

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

Observed state Occurrence Expectation Interpretation
0, -1, -1 567998 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 351772 ACCEPTABLE actor2 update successfully