RFR: 8345322: RISC-V: Add concurrent gtests for cmpxchg variants
Hamlin Li
mli at openjdk.org
Mon Dec 9 13:43:37 UTC 2024
On Mon, 9 Dec 2024 11:12:11 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Yeah. But seems avoidable if we make the loop count smaller for the narrow cases? I think it will be simpler and more readable for people then.
>
> Yes, but doing just 127 incs there, then it is big chance of the threads not running at the same time.
> The point is that they should run parallel a period of time.
>
> I can nest loops?
Seems to me overflow is fine, it won't affect the test correctness? maybe we could add some comment to state it clearly.
Or maybe we could use something like barrier or phaser in java API to sync the real starting of different threads in the thread group? But I'm not sure if there are such utilities in hotspot test framework.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22574#discussion_r1875999765
More information about the hotspot-dev
mailing list