RFR: 8319935: Ensure only one JvmtiThreadState is create for one JavaThread associated with attached native thread [v3]

Jiangli Zhou jiangli at openjdk.org
Wed Nov 22 22:40:22 UTC 2023


On Wed, 22 Nov 2023 02:53:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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

Indeed, removed. Thanks.

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

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


More information about the serviceability-dev mailing list