discuss about release barrier for final fields initialization
Andrew Haley
aph-open at littlepinkcloud.com
Wed Jan 17 13:19:49 UTC 2024
On 1/11/24 11:58, Kuai Wei wrote:
> Thanks for reply. I checked the previous discussion and not clear about the root cause.
>
> If you can provide more detail about the optimize, like what load or load dependency will be elided, so we may check chance to detect or prevent.
We think you're probably right. However, C2 does a lot of reorganization,
so it's hard to say that C2 can never predict what might be stored by
static field initialization in one thread.
If you're benchmarking this, can you try dmb st; dmb ld without fusing
them together, thus avoiding a storeload? This would help us understand
the performance benefit.
--
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