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

David Holmes dholmes at openjdk.org
Tue Feb 7 02:12:46 UTC 2023


On Mon, 6 Feb 2023 09:40:00 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> 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?
>
> Yes. The JFR_JVM_THREAD_ID(thread) is a lazy assignment of the thread id. It can be done by the thread itself, or the periodic task thread. The premise for a JavaThread is that there exist a threadObj.

Now I get it. The zero thread id only arises when the `threadObj` is null and that is no longer possible when we skip JNI-attaching threads.

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

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


More information about the hotspot-jfr-dev mailing list