On Sun, 20 Nov 2022 08:48:16 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> The can_support_virtual_thread was initially implemented as an onload >> capability. >> It is why this capability does not work for the agents loaded into running >> VM. >> The fix is to move it from `onload` to `always`capabilities list. >> >> Testing: >> New test is added: VirtualStartThreadTest. >> TBD: mach5 jvmti, jdi and tier1-6 tests. > > Serguei Spitsyn has updated the pull request incrementally with one > additional commit since the last revision: > > fixed a trailing white space issue I've pushed an update to extend the test to cover more configurations: - agent loaded at startup and into running VM - with and without enabling JVMTI `can_support_virtual_classes` capability One problem was discovered and fixed in the `jvmtiExport.cpp`. The `ThreadStart` events that are posted on virtual thread when can_support_virtual_classes disabled provided carrier instead of virtual thread argument. The cause of it was that the `jvmtiThreadState` can be not set at the time the `ThreadStart` events are posted. ------------- PR: https://git.openjdk.org/jdk/pull/11246