AOT generates code blobs with GC-specific barriers

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 25
    • Component/s: hotspot

      At least Adapters access GC barriers when resolving weak CLDs, see for example BarrierSetAssembler::c2i_entry_barrier:

      void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler* masm) {

      ...

         // Is it a weak but alive CLD?
        __ movptr(tmp1, Address(tmp1, ClassLoaderData::holder_offset()));
        __ resolve_weak_handle(tmp1, tmp2); // <--- HERE
        __ cmpptr(tmp1, 0);
        __ jcc(Assembler::notEqual, method_live);

      ...
      }
      ```

      Which gets awkward when AOT saves the adapter in AOT cache. So we may end up generating the GC barrier for GC at the time of AOT cache dump, which might not be the same as the GC at runtime. We need to mechanically check this, and possibly disable storing the adapters for a while...

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: