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

Remove is-queue-active check in inner loop of write_ref_array_pre_work

    XMLWordPrintable

Details

    • gc
    • b05

    Backports

      Description

        G1BarrierSet::write_ref_array_pre_work roughly looks as follows:

        if marking active -> exit

        for all references in array:
          if array[i] != NULL
            enqueue(array[i])

        enqueue every time checks again whether marking is active. In reality, the generated assembly code seems to load Thread::current() and does the check for every loop iteration which is really unnecessary.

        Also some other code can be hoisted out of the loop which results in more compact generated code.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: