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

Jaroslav Bachorik jbachorik at openjdk.org
Fri Sep 5 09:28:13 UTC 2025


On Fri, 5 Sep 2025 08:00:50 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> Improve the sample queue size computation for the CPU-time sampler by increasing the size dynamically when needed, but keeping the default size small.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix build on non Linux

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 289:

> 287:     return Atomic::load(&_out_of_stack_walking_iterations);
> 288:   }
> 289:   #endif

Should this be ASSERT of DEBUG_ONLY? 
Eg. the fields are defined via DEBUG_ONLY.

test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java line 86:

> 84:                                           .sum();
> 85:                 ret.add(new LossEvent(actualStart, lostSamples));
> 86:             }

NIT: This could be probably more efficient by bulding time quantized bucket

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

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


More information about the hotspot-jfr-dev mailing list