RFR: 8338379: Accesses to class init state should be properly synchronized [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Sep 23 07:33:35 UTC 2024
On Mon, 23 Sep 2024 01:48:47 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Seems far more extensive than what was discussed. Code that takes the lock-free path to check `in_initialized` is what I thought we agreed needed the acquire/release not every read of the state variable. This code will be executed a lot and in 99.99% of cases the memory barriers are not needed.
This just extends the architectural parts of the patch we agreed with @coleenp for the fix. Which parts you think are excessive? The acquires in `instanceKlass.hpp`? It would be hard to track which one of those are used without a lock, I think.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21110#issuecomment-2367428015
More information about the hotspot-dev
mailing list