On Sun, 20 Nov 2022 08:48:16 GMT, Serguei Spitsyn <[email protected]> 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

Hi Serguei,

besides minor comments the changes look fine to me.

Best regards,
Richard.

src/hotspot/share/prims/jvmtiExport.cpp line 201:

> 199:   JvmtiVirtualThreadEventMark(JavaThread *thread) :
> 200:     JvmtiEventMark(thread) {
> 201:     if (thread->vthread() != NULL) {

Can this condition ever be false?

test/hotspot/jtreg/serviceability/jvmti/vthread/VirtualThreadStartTest/libVirtualThreadStartTest.cpp
 line 54:

> 52:     started_thread_cnt++;
> 53:   }
> 54:   deallocate(jvmti, jni, (void*)tname);

This will crash if `get_thread_name()` returns the string constant `"<Unnamed 
thread>"`

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

PR: https://git.openjdk.org/jdk/pull/11246

Reply via email to