Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234009

ZGC: Move resurrection unblock to before the _unload.purge() call

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b25

      Description

      After JDK-8230661 we are guaranteed that no mutator holds a weak oop containing a "dead" object when the ZResurrection::unblock() call happens.

      Therefore, it doesn't matter if the load barrier that the thread executes runs the code guarded by ZResurrection::is_blocked() or the "non-blocked" part, when ZResurrection::unblock() changes the state. As long as the ZResurrection::unblock() call happens after the handshake, we are good to go.

      Today, we perform the purging and deletion of metadata in _unload.purge(), and call ZResurrection:unblock() after that. There's no need to delay the unblocking to after the purge. We have the opportunity to shrink the resurrection-blocked window by moving the ZResurrection::unblock() call to before the call to _unload.purge(), but still after the handshake.

        Attachments

          Activity

            People

            • Assignee:
              stefank Stefan Karlsson
              Reporter:
              stefank Stefan Karlsson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: