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

ZGC: Unify nmethod closures in the heap iterator

    XMLWordPrintable

    Details

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

      Description

      In the heap iterator, we use different nmethod closures to visit the on-stack nmethods and the rest that are visited if class unloading is turned off.

      The rational is that the first set have already been processed and does not have to be fixed, so the code simply verifies that the nmethod has been processed and visits all the oops. The second set contains nmethods of the kind that has been entered and processed, and those that have not. Before visiting oops in those nmethods, we apply an nmethod barrier to ensure that it's safe to visit the oops.

      The proposal is to get rid of this separation and simply apply the nmethod entry barrier on all visited nmethods. This will make it easier to reason about the safeness of visiting the oops.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: