RFR: 8301380: jdk/jfr/api/consumer/streaming/TestCrossProcessStreaming.java [v2]

David Holmes dholmes at openjdk.org
Mon Feb 6 00:52:52 UTC 2023


On Fri, 3 Feb 2023 09:28:05 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> src/hotspot/share/prims/jni.cpp line 3841:
>> 
>>> 3839:   }
>>> 3840: 
>>> 3841:   // Please keep this inside the _attaching_via_jni section.
>> 
>> Suggestion:
>> 
>> // Ensure the thread_id is set whilst still `_attaching_via_jni` so that it can be seen
>> // once the thread is included by the JFR thread iterator.
>> 
>> ?
>
> Thanks David. I realized there is no need to move anything in jni.cpp, so I rolled them back. The change to the iterator will suffice.

It will? Don't you still have the problem that the thread can be seen after ` thread->set_done_attaching_via_jni();` but before `post_thread_start_event(thread);` where the id will be set?

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

PR: https://git.openjdk.org/jdk/pull/12388


More information about the hotspot-jfr-dev mailing list