RFR: 8342818: Implement JEP 509: JFR CPU-Time Profiling [v5]

Johannes Bechberger jbechberger at openjdk.org
Mon May 26 06:31:53 UTC 2025


On Sun, 25 May 2025 20:12:09 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 65:
>> 
>>> 63:   Thread* raw_thread = Thread::current_or_null_safe();
>>> 64:   JavaThread* jt;
>>> 65:   if (raw_thread == nullptr || !raw_thread->is_Java_thread()) { // this can happen due to the high level of parralelism
>> 
>> Is "!raw_thread->is_Java_thread()" even possible, if a timer is only associated with a JavaThread, and a thread deletes its timer before it destroys itself?
>
> Also, is raw_thread == nullptr even possible? For the same reasons.

`!raw_thread->is_Java_thread()` I found it during testing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106643535


More information about the hotspot-jfr-dev mailing list