RFR: 8374828: Save load_barrier_on_oop_field_preloaded in aot CodeCache

Andrew Dinn adinn at openjdk.org
Mon Jan 12 15:06:47 UTC 2026


On Mon, 12 Jan 2026 14:24:06 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> If we follow the ZBarrierSetAssembler::load_at we see the call:
> `     __ call_VM_leaf(ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded_addr(decorators), 2);`

Hmm, well if that call is being generated then any attempt to save an AOT cache when using ZGC ought fail as it did in the Valhalla case because the generated code will reference an unknown external address. I just checked head and `load_barrier_on_oop_field_preloaded_addr` is not added as an external address. Oddly though `load_barrier_on_phantom_oop_field_preloaded_addr` is included -- it ought not to be needed as no saved code should be referring to it. That may be a hangover from when the code was copied from Leyden premain but it also suggests that maybe something has changed in the Z barrier code and the AOT support is not up to date with it?

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

PR Comment: https://git.openjdk.org/jdk/pull/29129#issuecomment-3739011831


More information about the hotspot-compiler-dev mailing list