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

Markus Grönlund mgronlun at openjdk.org
Mon May 26 10:27:56 UTC 2025


On Mon, 26 May 2025 09:44:30 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 601:
>> 
>>> 599: 
>>> 600:   if (jt->thread_state() == _thread_in_native &&
>>> 601:     tl->cpu_time_jfr_queue().size() > tl->cpu_time_jfr_queue().capacity() * 2 / 3) {
>> 
>> Is this testing what you intend? The precedence order is [*, / ], from left to right associativity
>
> I can't follow. This is testing whether the queue is more than two thirds full.

I'm sorry, I read this wrong. In this case, it does not matter: (capacity * 2) / 3 == capacity * (2/3)

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

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


More information about the hotspot-jfr-dev mailing list