On Wed, 4 Nov 2026 08:17:36 GMT, Gui Cao <[email protected]> wrote: >> test/hotspot/jtreg/serviceability/sa/TestContinuationEntry.java line 61: >> >>> 59: long alignedSize = ((rawSize + alignment - 1) / alignment) >>> * alignment; >>> 60: String cpu = agent.getDebugger().getCPU(); >>> 61: long expectedOffset = alignedSize + (cpu.equals("riscv64") >>> ? 2 * wordSize : 0); >> >> It would be nice to have a comment on why the extra logic is needed for >> riscv64, and maybe reference the hotspot riscv64 >> ContinuationEntry::entry_fp() and/or the SA >> RISCV64ContinuationEntry.getEntryFP() code. >> >> Also, it appears this PR is based on a revision of openjdk that does not yet >> include the fix to RISCV64ContinuationEntry.getEntryFP(). How is this test >> passing for you on riscv64? > >> Also, it appears this PR is based on a revision of openjdk that does not yet >> include the fix to RISCV64ContinuationEntry.getEntryFP(). How is this test >> passing for you on riscv64? > > Sorry, I discovered this bug while reviewing the fix for > [JDK-8391637](https://bugs.openjdk.org/browse/JDK-8391637). After that one > was integrated, I forgot to rebase code.
> It would be nice to have a comment on why the extra logic is needed for > riscv64, and maybe reference the hotspot riscv64 > ContinuationEntry::entry_fp() and/or the SA > RISCV64ContinuationEntry.getEntryFP() code. Thanks for the review. The RISC-V-specific offset comes from its frame layout: frame_riscv.hpp places the saved caller FP at fp[-2](link_offset) and the return address at fp[-1] (return_addr_offset). Accordingly, RISC-V’s ContinuationEntry::entry_fp() is two words beyond the aligned ContinuationEntry, which is why the test expects alignedSize + 2 * wordSize. I’ve added a comment explaining the extra offset. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33695#discussion_r4465551165
