RFR: 8287555: Tighten G1 G1BlockOffsetTable::block_start() code

Thomas Schatzl tschatzl at openjdk.org
Mon Jun 27 10:07:38 UTC 2022


On Sat, 25 Jun 2022 00:16:43 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> CPU resources like branch prediction/speculative execution aren't free either, and this is a very performance sensitive area of code.
>> I'm planning to revisit this again for the card scanning code which in 99% of cases takes the aligned path.
>
> Then why not just card-align addr and always use the fast path code?

@kimbarrett: The `block_start` method returns the first object reaching into `addr`; if we aligned first, then the result would be the first object reaching into `aligned(addr)` which is different; the callers would need to advance forward not-requested objects then.
Or maybe I'm missing something in your suggestion?

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

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



More information about the hotspot-gc-dev mailing list