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

Use RAII to set the scanning source in G1ScanEvacuatedObjClosure

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: