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

Johannes Bechberger jbechberger at openjdk.org
Mon May 26 09:33:36 UTC 2025


On Sun, 25 May 2025 15:16:35 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix compilation
>
> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 630:
> 
>> 628: 
>> 629: bool JfrCPUTimeThreadSampler::create_timer_for_thread(JavaThread* thread, timer_t& timerid) {
>> 630:   if (thread->osthread() == nullptr || thread->osthread()->thread_id() == 0){
> 
> When is this possible?

I removed it.

> src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp line 362:
> 
>> 360: #ifdef LINUX
>> 361:   if (tl->has_cpu_time_jfr_requests()) {
>> 362:     JfrTicks now = JfrTicks::now();
> 
> You should be able to reuse the already taken now, no?

Good catch.

> src/hotspot/share/jfr/support/jfrThreadLocal.cpp line 564:
> 
>> 562: }
>> 563: 
>> 564: void JfrThreadLocal::set_has_cpu_time_jfr_requests(bool has_events) {
> 
> "has_events" seems to be an unfortunate naming. "has_requests" I guess?

Good catch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106858516
PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106862855
PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106864886


More information about the hotspot-jfr-dev mailing list