On Tue, 21 Nov 2023 22:45:54 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> Jiangli Zhou has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Add a check for a thread is_attaching_via_jni, based on David Holmes' 
>> comment.
>
> src/hotspot/share/prims/jvmtiExport.cpp line 3144:
> 
>> 3142:   // If the current thread is attaching from native and its thread oop 
>> is being
>> 3143:   // allocated, things are not ready for allocation sampling.
>> 3144:   if (thread->is_Java_thread()) {
> 
> Nit: There is no need for this check at line 3144.
> There was already check for `!thread->is_Java_thread()` and return with false 
> at line 3138:
> 
>   if (!thread->is_Java_thread() || thread->is_Compiler_thread()) {
>     return false;
>   }

+1

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

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

Reply via email to