RFR: 8345322: RISC-V: Add concurrent gtests for cmpxchg variants

Robbin Ehn rehn at openjdk.org
Fri Dec 6 12:52:38 UTC 2024


On Fri, 6 Dec 2024 12:45:35 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> test/hotspot/gtest/riscv/test_assembler_riscv.cpp line 279:
>> 
>>> 277:   int num_threads = 4;
>>> 278:   CmpxchgTester<TESTSIZE, ASMSIZE> cmpxchg(0, false); // variant 0, not bool ret
>>> 279:   auto incThread = [&](Thread* _current, int _id) {
>> 
>> By checking the test framework code, seems passed-in `_id` starts from `0` for the first thread in thread group and increment `1` for every other thread?
>> It might be good have some comment here to state it explicitly to help read the code in the future.
>
> And same for other `_id`s below.

Yes, sure.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22574#discussion_r1873285327


More information about the hotspot-dev mailing list