On Tue, 19 Sep 2023 09:00:01 GMT, Fredrik Bredberg <fbredb...@openjdk.org> wrote:
> Relativize initial_sp in interpreter frames. > > By changing the "initial_sp" (AKA "monitor_block_top" or "monitors" on > PowerPC) member in interpreter frames from being an absolute address into an > offset that is relative to the frame pointer, we don't need to change the > value as we freeze and thaw frames of virtual threads. This is since we might > freeze and thaw from and to different worker threads, so the absolute address > to locals might change, but the offset from the frame pointer will be > constant. > > This subtask only handles relativization of "initial_sp" and > "monitor_block_top" since it's the same slot in interpreter frames (roughly > the same as "monitors" on PowerPC). Relativization of other interpreter frame > members are handled in other subtasks to JDK-8289296. > > Tested tier1-tier7 on supported platforms. The rest was sanity tested using > Qemu. Hi, I have arranged tier1-3 test on linux-riscv64 platform. Thanks for adding handling for riscv. src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 704: > 702: // register for unlock_object to pass to VM directly > 703: ld(c_rarg1, monitor_block_top); // derelativize pointer > 704: shadd(c_rarg1, c_rarg1, fp, c_rarg1, LogBytesPerWord); Nit: One redundant space between the 3rd and 4th parameters for each `shadd` call added. ------------- PR Review: https://git.openjdk.org/jdk/pull/15815#pullrequestreview-1635063095 PR Review Comment: https://git.openjdk.org/jdk/pull/15815#discussion_r1331261765