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

Finer grained primitive arrays bulk access barriers

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Withdrawn
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • CPU:
      generic
    • OS:
      generic

      Description

      Currently, for any bulk access on primitive arrays (e.g. *_at_addr() family of methods, arraycopy, and the like), we do Access::resolve() on the base arrayOop (via arrayOopDesc::base() ). This is safe and does the right thing, but it is overly broad. In a garbage collector like Shenandoah, Access::resolve() would have to do a write-barrier, which is a copy-on-write. This could lead to double-copying of potentially large arrays, i.e. resolving the src array would copy it from from-space to to-space, and then it needs to be copied again from src to dst. Most of the accesses via _at_addr() are read-accesses, and they could use a weaker read-barrier, which only chases the forwarding pointer.

        Attachments

          Activity

            People

            • Assignee:
              rkennke Roman Kennke
              Reporter:
              rkennke Roman Kennke
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: