RFR: 8359359: AArch64: share trampolines between static calls to the same method [v8]

Mikhail Ablakatov mablakatov at openjdk.org
Wed Nov 26 16:13:23 UTC 2025


On Mon, 10 Nov 2025 21:58:21 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> Mikhail Ablakatov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits:
>> 
>>  - Merge commit 'f6f87bb6759c86d941453a1776e8abfdffc48183' into 8359359
>>  - the only trampoline in ArrayCopyStub is never shared
>>  - fixup: a shared trampoline must branch to a statically bound method
>>  - share static call trampolines generated by C1 as well
>>  - assert callee is nullptr for runtime calls
>>  - assert that call sites offsets aren't missing
>>  - cleanup: rephrase comments in macroAssembler_aarch64.hpp
>>  - Merge commit 'fd29677479797956e0d205b5ce6e7cb9ad407bd1' into 8359359
>>  - Merge commit '41520998aa8808452ee384b213b2a77c7bad668d'
>>  - remove implementation-dependent logic from emit_shared_trampolines()
>>  - ... and 8 more: https://git.openjdk.org/jdk/compare/f6f87bb6...871903f4
>
> test/hotspot/jtreg/compiler/sharedstubs/SharedRuntimeCallTrampolineTest.java line 107:
> 
>> 105:                 .map(reloc -> new String(reloc.addr()))
>> 106:                 .collect(Collectors.toList());
>> 107:         if (trampolineAddrs.stream().distinct().count() >= trampolineAddrs.size()) {
> 
> For better readability, could you please create a meaningful variable for `trampolineAddrs.stream().distinct().count()`? You can reuse it in the exception message as well.

Done, please see https://github.com/openjdk/jdk/pull/25954/commits/ac36641d980c057fb7060e0edd782514a926601f

> test/hotspot/jtreg/compiler/sharedstubs/SharedStaticCallTrampolineTest.java line 53:
> 
>> 51: import jdk.test.lib.process.ProcessTools;
>> 52: 
>> 53: public class SharedStaticCallTrampolineTest {
> 
> Similar comments as to `SharedRuntimeCallTrampolineTest.java`

Done, please see https://github.com/openjdk/jdk/commit/ac36641d980c057fb7060e0edd782514a926601f.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25954#discussion_r2565611348
PR Review Comment: https://git.openjdk.org/jdk/pull/25954#discussion_r2565612724


More information about the hotspot-dev mailing list