org.openjdk.jcstress.tests.atomicity.varHandles.fields.GetAndAddTest.GetAndAddLong

Tests atomicity of getAndAdd.

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 98545 ACCEPTABLE actor1 execute after actor2
0, -1, -2 800075 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 199203 ACCEPTABLE actor1 execute after actor2
0, -1, -2 506777 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 88440 ACCEPTABLE actor1 execute after actor2
0, -1, -2 249270 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 490690 ACCEPTABLE actor1 execute after actor2
0, -1, -2 822310 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 29493 ACCEPTABLE actor1 execute after actor2
0, -1, -2 354637 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 201105 ACCEPTABLE actor1 execute after actor2
0, -1, -2 528365 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 11961 ACCEPTABLE actor1 execute after actor2
0, -1, -2 18169 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 19430 ACCEPTABLE actor1 execute after actor2
0, -1, -2 341790 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic