On Mon, 2 Jun 2025 14:57:47 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix bug related to async stack walking > > src/hotspot/share/jfr/jfr.inline.hpp line 41: > >> 39: inline void Jfr::check_and_process_sample_request(JavaThread* jt) { >> 40: JfrThreadLocal* tl = jt->jfr_thread_local(); >> 41: bool has_cpu_time_sample_request = tl->has_cpu_time_jfr_requests(); > > Why this change? So I don't read the ` tl->has_cpu_time_jfr_requests()` twice on the hot-path > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 349: > >> 347: const frame top_frame = thread->last_frame(); >> 348: bool in_continuation = is_in_continuation(top_frame, thread); >> 349: for (u4 i = 0; i < queue.size(); i++) { > > Realized this drainage is entirely wrong! > > You are not using the sample requests in the queue to build individual stack > traces for events; instead, you are using the same top frame (the last Java > frame) for all of them. Can I export compute_top_frame and use it here? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2121424752 PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2121413413