On Mon, 19 Oct 2026 22:16:17 GMT, Xin Liu <[email protected]> wrote: >> Andrei Pangin has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Re-implemented native frames support using variable-size requests >> - 8392187: JFR: Use-after-free bug in CPU-time profiler can crash JVM > > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 165: > >> 163: u4 capacity = _capacity; >> 164: if (capacity < CPU_TIME_QUEUE_MAX_CAPACITY) { >> 165: float ratio = (float)(lost_samples_due_to_queue_full * >> JfrCPUTimeSampleRequest::fixed_size()) / (float)capacity; > > but this doesn't reflect the demand of native frame part. > If we observe lost_samples when native_stack is enabled, i think the real > demand of space is bigger.
This is a rough estimation anyway, it does not affect correctness. In the worst case, the queue will grow again next time, but the process converges quickly. I just wanted to keep the code simple and let it behave exactly as before when native frames are disabled. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32524#discussion_r4320555940
