RFR: 8346194: Improve G1 pre-barrier C2 cost estimate [v2]
Thomas Schatzl
tschatzl at openjdk.org
Mon Mar 17 08:00:05 UTC 2025
On Fri, 7 Mar 2025 08:47:13 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp
>>
>> Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>
>
> Looks good, thanks for addressing my feedback Thomas!
>
> Reducing the estimated GC barrier size could lead to over-unrolling, which might increase code cache pressure and ultimately affect performance. In practice, it seems that the effect of estimated GC barrier size on total code size is limited though: I studied the impact on C2-generated code size using DaCapo 23 on x64 and aarch64 and it is basically unaffected by this change. In the extreme case of estimating GC barrier size to be 0, the overall code size increase is of about 1% for x64 and 0.5% for aarch64. If each GC barrier (pre and post) is estimated to correspond to 20 nodes, the code size increase is further reduced to only 0.5% for x64 and 0.01% for aarch64. Beyond that, the code size increase becomes statistically insignificant.
Thanks @robcasloz @albertnetymk for your reviews
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23862#issuecomment-2728496581
More information about the hotspot-dev
mailing list