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

Use RAII to set the scanning source in G1ScanEvacuatedObjClosure

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • hotspot
    • gc
    • b18

      G1ScanEvacuatedObjClosure needs to be told where the object that is scanned is located (young/old) to properly handle additions to the remembered sets.

      Currently we call a method on G1ScanEvacuatedObjClosure to do so, but it would be better to use an RAII object that automatically sets and resets it. With an additional "Uninitialized" state, basic checking whether the value has been set to find bugs can be implemented easily too.

      Suggested by ~kbarrett in the review thread for JDK-8212911.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: