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

Johannes Bechberger jbechberger at openjdk.org
Mon May 5 13:29:59 UTC 2025


On Mon, 5 May 2025 13:26:02 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> But the global queue of fresh elements (that are then enqueued into the thread-local stacks) needs to signal handler safe (dequeue in multiple signal handlers in multiple thread at the same time) and is pushed to from all threads at their safepoints.
>
> You certainly can use pre-allocated array as allocation pool, with additional `next` field. However, the challenge is how to deal with `ABA` problem (or does it have `ABA` problem?). I am not sure you can use `GlobalCounter` inside signal handlers.

This is why I replaced it with a queue that doesn't have these problems.

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

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


More information about the hotspot-dev mailing list