RFR: 8366082: Improve queue size computation in CPU-time sampler [v2]

Johannes Bechberger jbechberger at openjdk.org
Mon Aug 25 14:29:08 UTC 2025


On Mon, 25 Aug 2025 14:23:44 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:

>> No other thread can change it. The queue capacity is only changed when
>> - a thread is created (so queue drainage is possible in parallel
>> - when the queue is drained and there is sample loss (but this happens only with a dequeue lock)
>> - a thread is terminated: I added synchronisation to prevent concurrency
>
> Thanks for the clarification

I pushed the fix to include the proper locking, thank you for catching the issue

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26926#discussion_r2298268592


More information about the hotspot-jfr-dev mailing list