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

Johannes Bechberger jbechberger at openjdk.org
Wed Jun 4 08:21:33 UTC 2025


On Wed, 4 Jun 2025 08:14:11 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> I added another `_static_stop_signals` field which should prevent this.
>
> The _instance is only ever deleted in case a JFR startup attempt fails as part of JfrRecorder::create(). The sampler must have a rate and become enrolled to serve clients (by installing timers). The rate is set post JfrRecorder::create() using the setting system, which implies that _instance != nullptr should be invariant.

Yes, you're right. I'll update the code and combine `_active_signal_handlers` and `_stop_signals` in one, so that a CAS loop prevents `_active_signal_handlers` from being incremented when `_stop_signals` is true. This should solve the other data race.

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

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


More information about the serviceability-dev mailing list