RFR: 8343177: JFR: Remove critical section for thread id assignment [v2]

David Holmes dholmes at openjdk.org
Thu Oct 31 05:12:30 UTC 2024


On Wed, 30 Oct 2024 11:29:04 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> src/hotspot/share/jfr/support/jfrThreadLocal.cpp line 106:
>> 
>>> 104:   assert(Thread::is_starting_thread(jt), "invariant");
>>> 105:   assert(jt->threadObj() == nullptr, "invariant");
>>> 106:   jt->jfr_thread_local()->_jvm_thread_id = 1;
>> 
>> Is this supposed to reflect the `java.lang.Thread` thread-id? If so this is changing to 3 with the object monitor virtual thread changes.
>
> If the primordial thread ID assignment is changed from 1 to 3, then that will have to be updated, of course.

Hopefully the value will be available via the ObjectMonitor API so this code can use it symbolically.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21756#discussion_r1823770635


More information about the hotspot-jfr-dev mailing list