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

Johannes Bechberger jbechberger at openjdk.org
Tue Sep 2 14:10:49 UTC 2025


On Tue, 2 Sep 2025 08:29:13 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:

>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add queue locking on thread termination
>
> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 185:
> 
>> 183:     }
>> 184:     if (factor > 1) {
>> 185:       u4 new_capacity = capacity * factor > CPU_TIME_QUEUE_MAX_CAPACITY ? CPU_TIME_QUEUE_MAX_CAPACITY : capacity * factor;
> 
> NIT: Could use the MAX2 macro - no real functionality change, though.

MIN2 :)

I didn't know these macros existed.

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

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


More information about the hotspot-jfr-dev mailing list