RFR: 8319935: Ensure only one JvmtiThreadState is create for one JavaThread associated with attached native thread [v3]
David Holmes
dholmes at openjdk.org
Wed Nov 22 02:56:06 UTC 2023
On Tue, 21 Nov 2023 22:45:54 GMT, Serguei Spitsyn <sspitsyn at 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
More information about the serviceability-dev
mailing list