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

Zhengyu Gu zgu at openjdk.org
Mon May 5 12:51:59 UTC 2025


On Mon, 5 May 2025 11:37:49 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 one additional commit since the last revision:
> 
>   Fix missing threads and other things

src/hotspot/share/runtime/handshake.hpp line 135:

> 133:   bool can_run(bool allow_suspend, bool check_async_exception);
> 134: 
> 135:   bool has_operation();

`has_operation()` was an inline method, it was called from `SafepointMechanism::should_process()` (now, it calls `can_run`). I believe `SafepointMechanism::should_process()` is a latency sensitive and inlined method.

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

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


More information about the hotspot-dev mailing list