On Tue, 1 Dec 2026 15:42:50 GMT, Andrei Pangin <[email protected]> wrote:

>> Yes, I like the folded version.
>> The problem is, it introduces another scenario of 
>> https://bugs.openjdk.org/browse/JDK-8396148, where 
>> `JfrCPUTimeThreadSampling::on_javathread_create` can be called twice for the 
>> main thread: one during `-XX:StartFlightRecording` enrollment, another from 
>> `JNI_CreateJavaVM_inner`.
>> 
>> I have another PR that fixes this issue: 
>> https://github.com/openjdk/jdk/pull/33651
>> Once that PR is integrated, I'm happy to make the discussed change.
>
> Now that #33651 has been integrated, a simplified fix for this issue will 
> work correctly.
> 
> @mgronlun I've rewritten it as we discussed earlier - please take a look.
> 
> @dholmes-ora The fix addresses your previous concern too: 
> `JfrCPUTimeThreadSampling::on_javathread_create` is now called 
> unconditionally.

Looks good, Andrei.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33678#discussion_r4758541997

Reply via email to