Shenandoah: Improve native jobject resolve GC state check

XMLWordPrintable

    • gc

      I was looking at adjacent code, and noticed that `ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native` checks for `EVACUATION` when resolving the `jobject`. JDK-8228532 was implemented to support weak roots, so it stands to some reason why it checks EVACUATION. That path is used from quick JNI getters, and it stands to reason we need to go to slowpath (and associated barriers) when weak roots are currently in progress.

      Looks like EVACUATION should really be either WEAK_ROOTS to be precise in its intent, or HAS_FORWARDED to be conservatively correct when heap is not idle at all.

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

              Created:
              Updated: