On Tue, 15 Jul 2025 07:17:10 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   simplified the update
>
> src/hotspot/share/prims/jvmtiThreadState.cpp line 1046:
> 
>> 1044: void JvmtiThreadState::update_thread_oop_during_vm_start(JavaThread* 
>> thread) {
>> 1045:   assert(thread->threadObj() != nullptr, "santity check");
>> 1046:   if (thread->jvmti_thread_state()->get_thread_oop() == nullptr) {
> 
> Nit: Replace `thread->jvmti_thread_state()->get_thread_oop()` with 
> `get_thread_oop()`.

I realised that thread is already in this state, so no need to set it as a 
parameter.

> src/hotspot/share/prims/jvmtiThreadState.cpp line 1047:
> 
>> 1045:   assert(thread->threadObj() != nullptr, "santity check");
>> 1046:   if (thread->jvmti_thread_state()->get_thread_oop() == nullptr) {
>> 1047:     _thread_oop_h.release(JvmtiExport::jvmti_oop_storage());
> 
> Nit: This line needs a comment explaining we are releasing an `OopHandle` 
> pointing to `null`.

I realized that  there is replace method and use it instead of release/update.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206722425
PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206725694

Reply via email to