RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v8]
Leonid Mesnik
lmesnik at openjdk.org
Wed Mar 29 02:43:40 UTC 2023
On Wed, 29 Mar 2023 01:16:55 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed trailing spaces in two files
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1151305059
More information about the serviceability-dev
mailing list