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

Markus Grönlund mgronlun at openjdk.org
Fri Feb 3 09:32:28 UTC 2023


On Fri, 3 Feb 2023 04:06:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Markus Grönlund has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - typos
>>  - unconditional id assignment
>
> src/hotspot/share/prims/jni.cpp line 3468:
> 
>> 3466: static void post_thread_start_event(const JavaThread* jt) {
>> 3467:   assert(jt != nullptr, "invariant");
>> 3468:   // We hoist the read for the thread id to ensure the thread is assigned an id (lazy assignment).
> 
> Suggestion:
> 
> // Ensure the thread is assigned an id (lazy assignment) even if the event isn't committed.

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.

> 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.

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

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


More information about the hotspot-jfr-dev mailing list