On Sat, 24 May 2025 17:48:16 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
>> src/hotspot/share/jfr/support/jfrThreadLocal.hpp line 103: >> >>> 101: volatile CPUTimeLockState _cpu_time_jfr_locked = UNLOCKED; >>> 102: volatile bool _has_cpu_time_jfr_requests = false; >>> 103: JfrCPUTimeTraceQueue _cpu_time_jfr_queue{0}; >> >> Please initialize these fields in the initializer list, like the other >> fields. >> >> Also, what capacity will the JfrCPUTimeTraceQueue have with an initializer >> like the above - {0}? In GDB i see that the capacity is 10000. Each element >> is 48 bytes, meaning each thread now has an associated queue of 468 kb, >> almost 0.5 Mb. Is that correct? > > I see that JfrCPUTimeTraceQueue::ensure_capacity_for_period() calculates and > sets the queue size as a function of the sampling period (in my case its 1 > ms). I reduced the base capacity to 500, but with far smaller values we risk many more lossed events. We should probably tune this value at the end. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2106782239