RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Mar 29 05:03:47 UTC 2023
On Wed, 29 Mar 2023 01:32:41 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1547:
>>
>>> 1545: JvmtiThreadState* ct_state = java_lang_Thread::jvmti_thread_state(jt->threadObj());
>>> 1546: JvmtiThreadState* vt_state = vt_oop != nullptr ? java_lang_Thread::jvmti_thread_state(vt_oop) : nullptr;
>>> 1547: bool virt = vt_oop != nullptr && vt_oop != ct_oop;
>>
>> You can move it inside if() in line 1554
>
> Doesn't it makes a sense to use
> bool virt = vt_oop != nullptr && java_lang_VirtualThread::is_instance(vt_oop);
> it is used in a lot of places and looks more usual as vthread check.
> Might be later it would be possible to refactor this expression to some separate function.
> Just a proposal, only if you agree with it.
> You can move it inside if() in line 1554
> Doesn't it makes a sense to use
> bool virt = vt_oop != nullptr && java_lang_VirtualThread::is_instance(vt_oop);
The local `virt` is also used at line 1555.
Second suggestion is good, thanks. I had to use it in the first place.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1151395915
More information about the hotspot-dev
mailing list