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

Remove obsolete comment in G1RootProcessor::process_java_roots

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16
    • hotspot
    • gc
    • b19

      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.

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

              Created:
              Updated:
              Resolved: