discuss about release barrier for final fields initialization

Andrew Haley aph-open at littlepinkcloud.com
Fri Jan 19 09:08:26 UTC 2024


On 1/18/24 10:49, Wei Kuai wrote:
>    I tested "dmb.ishst; dmb.ishld" for release barrier. The test case is jmh of allocation with final fields. https://gist.github.com/kuaiwei/f71fba40df29991c93325a8600e34c13 <https://gist.github.com/kuaiwei/f71fba40df29991c93325a8600e34c13>
> In N1
>    dmb.ish                    : 1168.059 ops/s
>    dmb.ishst+dmb.ishld: 1321.783 ops/s
>    dmb.ishst                 : 1511.267 ops/s
> In N2
>    dmb.ish                    : 3672.087 ops/s
>    dmb.ishst+dmb.ishld: 4840.322 ops/s
>    dmb.ishst                 : 6005.430 ops/s
> 
> The "dmb.ishst+dmb.ishld" can gain 13% and 32% on N1 and N2. It looks a better replacement for "dmb.ish"

Let's do that, then.

If you'd like to submit a patch that does this, please make sure to include
the benchmark.

We should also stop merging 'dmb ld' and 'dmb st' into 'dmb sy'. We still want
to merge duplicated `dmb`s, but the side effect of strengthening is not good.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-compiler-dev mailing list