On Wed, 28 Jan 2026 00:13:53 GMT, Alex Menkov <[email protected]> wrote:
>> src/hotspot/share/prims/jvmtiThreadState.cpp line 127:
>>
>>> 125: thread->set_interp_only_mode(false);
>>> 126: }
>>> 127: if (JvmtiEnvBase::is_thread_carrying_vthread(thread, thread_oop)) {
>>
>> wouldn't be better to move this into the beginning of ctor:
>>
>> if(!JvmtiEnvBase::is_thread_carrying_vthread(thread, thread_oop)) {
>> _thread = thread;
>> _thread_saved = nullptr;
>> } else {
>> _thread_saved = thread;
>> _thread = nullptr;
>> }
>>
>> and might be add comments with explanation.
>
> +1
> And have you tried to implement a test for the case?
> wouldn't be better to move this into the beginning of ctor
Good suggestion, thanks. Fixed now and added a comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29436#discussion_r2740677522