org.openjdk.jcstress.tests.atomicity.varHandles.byteArray.little.CAETest.CompareAndExchangeAcquireInt

Tests atomicity of compareAndExchange.

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

Observed state Occurrence Expectation Interpretation
-2, 0, -2 249257 ACCEPTABLE actor2 update successfully
0, -1, -1 457153 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 400672 ACCEPTABLE actor2 update successfully
0, -1, -1 846528 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 513799 ACCEPTABLE actor2 update successfully
0, -1, -1 282641 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 456267 ACCEPTABLE actor2 update successfully
0, -1, -1 1193803 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 406402 ACCEPTABLE actor2 update successfully
0, -1, -1 659398 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 300855 ACCEPTABLE actor2 update successfully
0, -1, -1 942435 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 168811 ACCEPTABLE actor2 update successfully
0, -1, -1 1034539 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 59508 ACCEPTABLE actor2 update successfully
0, -1, -1 13542 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