RFR: 8364819: Post-integration cleanups for JDK-8359820 [v5]

Anton Artemov duke at openjdk.org
Tue Aug 12 12:24:15 UTC 2025


On Tue, 12 Aug 2025 10:09:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Conventionally, the `Atomic::X` is used to access `volatile` vars, so the getters should be updated as well.

I do not think so, getters return a copy of the thread's address. 

> Maybe such "heavy" operation contains enough instructions that CPU doesn't/couldn't reorder the important read... Just to be explicit, the following is the problematic scenario I had in mind, and I assume it's the same one Aleksey talked about.

I am not familiar with herd7 tool and with ARM nuances, but I do not think the example is relevant. This scenario cannot be applied to **this particular case**, as we never will have update of the value happening concurrently with the read, as there is a expensive operation between the two. Let's not overengineer the solution for this failing code path.

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

PR Comment: https://git.openjdk.org/jdk/pull/26656#issuecomment-3179096986


More information about the hotspot-dev mailing list