RFR: 8334215: serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual [v2]
David Holmes
dholmes at openjdk.org
Tue Jun 18 09:34:19 UTC 2024
On Mon, 17 Jun 2024 13:24:23 GMT, Inigo Mediavilla Saiz <duke at openjdk.org> wrote:
>> Follow up to https://github.com/openjdk/jdk/pull/19482 that was causing issues when the PrintMountedVirtualTest.java was
>> running with `JTREG_TEST_THREAD_FACTORY=Virtual` in the loom repo.
>>
>> - Fixes issues where the test observes the thread during transitions.
>> - Fixes a potential issue in the test where CountDownLatch.countDown unparks the main (virtual) thread and the main thread observes the dummy thread is transition .
>
> Inigo Mediavilla Saiz has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve assert and document conditional print
src/hotspot/share/runtime/threads.cpp line 1336:
> 1334: assert(vt != nullptr, "vthread should not be null when vthread is mounted");
> 1335: if (vt != thread_oop) {
> 1336: // JavaThread._vthread can refer to the carrier thread. Print only if _vthread refers to a virtual thread.
Nit: please put the comment before the `if`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19744#discussion_r1644146331
More information about the serviceability-dev
mailing list