8303153: Native interpreter frame missing mirror#13794
8303153: Native interpreter frame missing mirror#13794fbredber wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back fbredber! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
I'd appreciate if @theRealAph and @RealFYang can have a look at this. |
|
@fbredber This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 168 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@coleenp, @RealFYang) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
RealFYang
left a comment
There was a problem hiding this comment.
Hi,
Thanks for taking care of RISC-V at the same time.
I think it would be cleaner if we do following for the RISC-V part:
diff --git a/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp b/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp
index 3e0e94515fc..f8ce528634f 100644
--- a/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp
+++ b/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp
@@ -770,8 +770,10 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ sd(x19_sender_sp, Address(sp, 9 * wordSize));
__ sd(zr, Address(sp, 8 * wordSize));
- // Get mirror
+ // Get mirror and store it in the frame as GC root for this Method*
__ load_mirror(t2, xmethod, x15, t1);
+ __ sd(t2, Address(sp, 4 * wordSize));
+
if (!native_call) {
__ ld(t0, Address(xmethod, Method::const_offset()));
__ lhu(t0, Address(t0, ConstMethod::max_stack_offset()));
@@ -779,9 +781,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
__ slli(t0, t0, 3);
__ sub(t0, sp, t0);
__ andi(t0, t0, -16);
- // Store extended SP and mirror
+ // Store extended SP
__ sd(t0, Address(sp, 5 * wordSize));
- __ sd(t2, Address(sp, 4 * wordSize));
// Move SP out of the way
__ mv(sp, t0);
} else {
@@ -789,7 +790,6 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
// an exception (see TemplateInterpreterGenerator::generate_throw_exception())
__ sub(t0, sp, 2 * wordSize);
__ sd(t0, Address(sp, 5 * wordSize));
- __ sd(zr, Address(sp, 4 * wordSize));
__ mv(sp, t0);
}
}
RealFYang
left a comment
There was a problem hiding this comment.
Looks reasonable to me. Thanks for the update.
FYI: I have performed tier1-3 tests on linux-riscv64 board, result looks good.
|
Thanks for the review @coleenp and @RealFYang. |
|
/integrate |
|
/sponsor |
|
Going to push as commit 5a259d8.
Your commit was automatically rebased without conflicts. |
The mirror needs to be stored in the frame for native calls also on AArch64 and RISC-V (as it is on other platforms).
See JDK-8303153 for more info.
Passes tier1-5 tests on AArch64. Done basic tests on RISC-V using QEmu.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13794/head:pull/13794$ git checkout pull/13794Update a local copy of the PR:
$ git checkout pull/13794$ git pull https://git.openjdk.org/jdk.git pull/13794/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13794View PR using the GUI difftool:
$ git pr show -t 13794Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13794.diff
Webrev
Link to Webrev Comment