RFR: 8374828: Save load_barrier_on_oop_field_preloaded in aot CodeCache
Aleksey Shipilev
shade at openjdk.org
Fri Jan 9 07:51:34 UTC 2026
On Thu, 8 Jan 2026 23:18:19 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Save this address so that the code that uses it in the valhalla repo will have it. This doesn't fail in main jdk repository.
> See CR for more information.
> Tested with tier1-4.
This looks OK on a surface, but I have a suspicion this points to a bug.
AOT code in mainline is not GC-sensitive. Meaning, you can generate the AOT cache with one GC and use it with another.
IIRC, the only generated code we are saving in mainline are adapters. Some adapters do have GC barriers in them, mostly around peeking into OopHandles. IIRC, this is why there are phantom barriers referenced in AOT table. That peeking involves no GC action. At some point, we reasoned it is "safe" to do even if GC changes. (Yes, it is fairly awkward and flimsy.) But seeing the need for non-phantom ZGC barrier implies something new is happening in lworld? Is it really safe then? In the sense that we might be missing a real GC barrier if GC selection changes between AOT creation and usage? That safety needs to be established separately.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29129#issuecomment-3727593202
More information about the hotspot-compiler-dev
mailing list