RFR: 8373367: interp-only mechanism fails to work for carrier threads in a corner case [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Jan 29 09:23:43 UTC 2026
On Wed, 28 Jan 2026 00:13:53 GMT, Alex Menkov <amenkov at openjdk.org> 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
More information about the hotspot-dev
mailing list