RFR: 7902989: jcstress: Add samples for high-level race conditions [v7]
Michael Mirwaldt
github.com+6693355+mmirwaldt at openjdk.java.net
Fri Jul 2 14:27:44 UTC 2021
On Fri, 2 Jul 2021 14:19:00 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Michael Mirwaldt has updated the pull request incrementally with one additional commit since the last revision:
>>
>> improved the code so that the used var names in the descriptions of the outcomes are not ambiguous any more now
>
> jcstress-samples/src/main/java/org/openjdk/jcstress/samples/high/race/condition/RaceCondition_01_ReadModifyWriteSequence.java line 65:
>
>> 63:
>> 64: r.r2 = v2;
>> 65: }
>
> Suggestion:
>
> int t = v;
> t -= 100;
> v = t;
> r.r2 = t;
> }
Can we call them t1 and t2 for the descriptions in the outcomes, please?
@vlsi asked me for traces in the descriptions:
@Outcome(id = {"150, 100, 150"}, expect = ACCEPTABLE, desc = "2: v=200, 2: v2=100, 2: v=v2, 1: v=100, 1: v1=150, 1: v=v1")
@Outcome(id = {"250, 150, 150"}, expect = ACCEPTABLE, desc = "1: v=200, 1: v1=250, 1: v=v1, 2: v=250, 2: v2=150, 2: v=v2")
@Outcome(id = {"250, 100, 250"}, expect = ACCEPTABLE_INTERESTING, desc = "1: v=200, 1: v1=250, 2: v=200, 2: v2=100, 2: v=v2, 1: v=v1")
@Outcome(id = {"250, 100, 100"}, expect = ACCEPTABLE_INTERESTING, desc = "1: v=200, 1: v1=250, 2: v=200, 2: v2=100, 1: v=v1, 2: v=v2")
Then I will replace v1 by t1 and v2 by t2.
-------------
PR: https://git.openjdk.java.net/jcstress/pull/88
More information about the jcstress-dev
mailing list