RFR: 8321137: Reconsider ICStub alignment [v3]

Aleksey Shipilev shade at openjdk.org
Wed Jan 17 12:52:07 UTC 2024


On Tue, 16 Jan 2024 09:56:46 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> This continues from #16911. It initially started as performance optimization to compact `ICStubs`, but I think the safety arguments for fitting the `ICStub` per instruction cache line prevails. See bug and previous PR for more gory details. The footprint improvements on some architectures come as side-effect of untying the `ICStub` size from `CodeEntryAlignment` to (sometimes lower) cache line size.
>> 
>> Note that the size of `ICStub` is important, because `ICBuffer` is small (10K by default), and its depletion causes the `ICBufferFull` safepoint. I would make a (separate) argument to bump the default `ICBuffer` size a bit to make it less important.
>> 
>> Current patch affects `ICStub` size in different ways on different platforms, since current size is effectively 2x`CodeEntryAlignment` and new size is cache line size:
>>  - ARM32: 32 -> 64 bytes :(
>>  - AArch64: 128 -> 64 bytes :)
>>  - x86_64: 64 -> 64 bytes :|
>>  - x86_32: 32 -> 64 bytes :(
>>  - PPC64: 512 -> 128 bytes :))
>>  - RISC-V: 128 -> 64 bytes :)
>>  - S390X: 128 -> 256 bytes :(
>>  - Zero: <not applicable, Zero does not use IC stubs>
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, `tier{1,2,3,4}`
>>  - [x] Linux AArch64 server fastdebug, `tier{1,2,3,4}`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Cautious
>  - Merge branch 'master' into JDK-8321137-reconsider-icstub-align
>  - Inline new_ic_stub
>  - Work

OK, thanks! I am going to merge it, and look for follow-ups, if any.

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

PR Comment: https://git.openjdk.org/jdk/pull/17277#issuecomment-1895742298


More information about the hotspot-dev mailing list