RFR: 8297036: Generalize C2 stub mechanism [v6]

Xiaolin Zheng xlinzheng at openjdk.org
Tue Dec 6 06:56:02 UTC 2022


On Wed, 30 Nov 2022 17:51:31 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> Currently, we have two implementations of out-of-line stubs in C2, one for safepoint poll stubs (C2SafepointPollStubTable in output.hpp) and another for nmmethod entry barriers (C2EntryBarrierStubTable in output.hpp). I will need a few more for Lilliput: One for checking lock-stack size in method prologue, one for handling lock failures (both for fast-locking), and another one for load-klass slow-path. It would be good to generalize the mechanism and consolidate the existing uses on the new general mechanism.
>> 
>> Testing:
>>  - [x] tier1 (x86_64, x86_32, aarch64)
>>  - [x] tier2 (x86_64, x86_32, aarch64)
>>  - [x] tier3 (x86_64, x86_32, aarch64)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> 
>   More RISCV fixes

The `<=` plan sounds nice to me. It seems that the `size()`s are only for expanding temp code buffers, so I think a bigger value could help, and if we can loosen them as "no longer fixed-length stubs", it would help to remove some adjustments to force making the stubs fixed-length in the RISC-V backend. Besides, we have no need to further adjust the AArch64 backend as well - the 20 for C2EntryBarrierStub is the max size it can emit.

Made a simple version due to the review comments, and I'd be pleased to cover the RISC-V part.

[riscv-11188-2.txt](https://github.com/openjdk/jdk/files/10163502/riscv-11188-2.txt)
A review of the same diff with colors: https://github.com/zhengxiaolinX/jdk/commits/pull/11188-4

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

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


More information about the hotspot-compiler-dev mailing list