RFR: 8346868: RISC-V: compiler/sharedstubs tests fail after JDK-8332689

Fei Yang fyang at openjdk.org
Sat Dec 28 08:29:09 UTC 2024


Hi, please review this change.

Here is the change history. [JDK-8293011](https://bugs.openjdk.org/browse/JDK-8293011) shared stubs to interpreter for static calls. And [JDK-8293770](https://bugs.openjdk.org/browse/JDK-8293770) further reused runtime call trampolines. So we have `static constexpr bool supports_shared_stubs() { return true; }`. And both cases are handled in `CodeBuffer::pd_finalize_stubs`.


bool CodeBuffer::pd_finalize_stubs() {
  return emit_shared_stubs_to_interp<MacroAssembler>(this, _shared_stub_to_interp_requests)
         && emit_shared_trampolines(this, _shared_trampoline_requests);
}


Then [JDK-8332689](https://bugs.openjdk.org/browse/JDK-8332689) turned off uses of trampolines for far calls by default and changed this function into: `static bool supports_shared_stubs() { return UseTrampolines; }`. This will cause the two test failures as option `UseTrampolines` is off by default. Further, [JDK-8343430](https://bugs.openjdk.org/browse/JDK-8343430) removed old trampoline call and option `UseTrampolines` as well. So now we have `static bool supports_shared_stubs() { return false; }` and a simplified `CodeBuffer::pd_finalize_stubs`.


bool CodeBuffer::pd_finalize_stubs() {
  return emit_shared_stubs_to_interp<MacroAssembler>(this, _shared_stub_to_interp_requests);
}


But [JDK-8332689](https://bugs.openjdk.org/browse/JDK-8332689) is supposed to only make reusing of the runtime call trampolines depend on option `UseTrampolines`. It should not affect the use of shared stubs to interpreter for static calls. So this restores `CodeBuffer::pd_finalize_stubs` letting it return true and disables SharedTrampolineTest.java test for this platform. Tagging @robehn.

Testing on Premier P550 SBC:
- [x] SharedStubToInterpTest.java (fastdebug)
- [x] Tier1-3 and gtest:all (release)

-------------

Commit messages:
 - 8346868: RISC-V: compiler/sharedstubs tests fail after JDK-8332689

Changes: https://git.openjdk.org/jdk/pull/22888/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22888&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346868
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/22888.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22888/head:pull/22888

PR: https://git.openjdk.org/jdk/pull/22888


More information about the hotspot-compiler-dev mailing list