RFR: 8346868: RISC-V: compiler/sharedstubs tests fail after JDK-8332689
Fei Yang
fyang at openjdk.org
Tue Jan 7 10:58:41 UTC 2025
On Tue, 7 Jan 2025 08:20:56 GMT, Robbin Ehn <rehn 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)
>
> Thanks!
@robehn @Hamlin-Li : Thanks!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22888#issuecomment-2574985100
More information about the hotspot-compiler-dev
mailing list