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

Remove obsolete comment in G1RootProcessor::process_java_roots

    XMLWordPrintable

    Details

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

      Description

      In G1RootProcessor::process_java_roots there is this comment:

        // We need to make make sure that the "strong" nmethods are processed first
        // using the strong closure. Only after that we process the weakly reachable
        // nmethods.
        // We need to strictly separate the strong and weak nmethod processing because
        // any processing claims that nmethod, i.e. will not be iterated again.
        // Which means if an nmethod is processed first and claimed, the strong processing
        // will not happen, and the oops reachable by that nmethod will not be marked
        // properly.
        //
        // That is why we process strong nmethods first, synchronize all threads via a
        // barrier, and only then allow weak processing. To minimize the wait time at
        // that barrier we do the strong nmethod processing first, and immediately after-
        // wards indicate that that thread is done. Hopefully other root processing after
        // nmethod processing is enough so there is no need to wait.
        //
        // This is only required in the concurrent start pause with class unloading enabled.

      After JDK-8230706 the process is quite different and this comment only confusing the reader.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ayang Albert Yang
              Reporter:
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: