6 Feb
2023
6 Feb
'23
12:52 a.m.
On Fri, 3 Feb 2023 09:28:05 GMT, Markus Grönlund <mgronlun@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