RFR: 8342818: Implement CPU Time Profiling for JFR [v43]

Markus Grönlund mgronlun at openjdk.org
Mon Apr 28 10:34:06 UTC 2025


On Mon, 17 Mar 2025 10:03:00 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> This is the code for the [JEP draft: CPU Time based profiling for JFR].
>> 
>> Currently tested using [this test suite](https://github.com/parttimenerd/basic-profiler-tests).
>> 
>> A version based on the cooperative sampling JEP can be found [here](https://github.com/parttimenerd/jdk/tree/parttimenerd_cooperative_cpu_time_sampler).
>
> Johannes Bechberger has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Improve placement of NoResourceMark
>  - Add more checks for metadata_do

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 556:

> 554:     stop_timer();
> 555:     Atomic::store(&_stop_signals, true);
> 556:     while (_active_signal_handlers > 0) {

This will cause the system to hang.

 The thread calling disenroll() is a JavaThread, which can get stuck in this while loop here, preventing the system from moving to a safepoint.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r2063380724


More information about the hotspot-dev mailing list