RFR: 8332670: C1 clone intrinsic needs memory barriers

Andrew Haley aph at openjdk.org
Tue Jun 4 09:13:10 UTC 2024


On Tue, 4 Jun 2024 08:43:04 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> All right, that looks reasonable.
> 
> I am a bit queasy on conditionally removing the `StoreStore` barrier from the allocation path, given that it also protects the object metadata. An accidentally missing barrier would probably lead to VM crash, that is in the best case. Current code paths do not seem to be affected by this, but there is also no guardrails that would protect us from making such a mistake in the future: someone adds `new NewTypeArray` somewhere, and forgets a trailing barrier?

I agree with you. I suspect an additional StoreStore` barrier after writing the header would make no difference in performance.

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

PR Comment: https://git.openjdk.org/jdk/pull/19538#issuecomment-2147005682


More information about the hotspot-compiler-dev mailing list