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

Fei Yang fyang at openjdk.org
Tue Jan 7 10:58:42 UTC 2025


On Sat, 28 Dec 2024 02:37:18 GMT, Fei Yang <fyang at openjdk.org> wrote:

> 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)

This pull request has now been integrated.

Changeset: 3f7052ed
Author:    Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3f7052ed7af89efd1c6977df0b4f3b95fcfec764
Stats:     2 lines in 2 files changed: 0 ins; 0 del; 2 mod

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

Reviewed-by: rehn, mli

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

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


More information about the hotspot-compiler-dev mailing list