org.openjdk.jcstress.tests.atomicity.varHandles.arrays.GetAndAddTest.GetAndAddInt

Tests atomicity of getAndAdd.

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 151477 ACCEPTABLE actor1 execute after actor2
0, -1, -2 879383 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 142580 ACCEPTABLE actor1 execute after actor2
0, -1, -2 1097960 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 133507 ACCEPTABLE actor1 execute after actor2
0, -1, -2 458003 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 23847 ACCEPTABLE actor1 execute after actor2
0, -1, -2 28043 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic

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

Observed state Occurrence Expectation Interpretation
-1, 0, -2 38495 ACCEPTABLE actor1 execute after actor2
0, -1, -2 821565 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 295647 ACCEPTABLE actor1 execute after actor2
0, -1, -2 819813 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 136349 ACCEPTABLE actor1 execute after actor2
0, -1, -2 1639531 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 319051 ACCEPTABLE actor1 execute after actor2
0, -1, -2 1226359 ACCEPTABLE actor1 execute before actor2
0, 0, -1 0 FORBIDDEN This won't happen because getAndAdd is atomic