On Tue, 14 Nov 2023 20:57:09 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:

>> Please review JvmtiThreadState::state_for_while_locked change to handle the 
>> state->get_thread_oop() null case. Please see 
>> https://bugs.openjdk.org/browse/JDK-8319935 for details.
>
> Jiangli Zhou has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Don't try to setup_jvmti_thread_state for obj allocation sampling if the 
> current thread is attaching from native and is allocating the thread oop. 
> That's to make sure we don't create a 'partial' JvmtiThreadState.

src/hotspot/share/prims/jvmtiThreadState.inline.hpp line 87:

> 85:     // Don't add a JvmtiThreadState to a thread that is exiting.
> 86:     return nullptr;
> 87:   }

I'm wondering if there should also be an `is_jni_attaching` check here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16642#discussion_r1395431239

Reply via email to