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

ZGC: C2: Oop instance cloning causing skipped compiles

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b26

      Description

      I found a few bugs after the enabling of the clone intrinsic in ZGC.

      1) The arraycopy clone_basic has the parameters adjusted to work as a memcopy. For an oop the src is pointing inside the oop to where we want to start copying. But when we want to do a runtime call to clone - the parameters are supposed to be the actual src oop and dst oop, and the size should be the instance size.

      For now I have made a workaround. What should be done later is using the offset in the arraycopy node to encode where the payload is, so that the base pointers are always correct. But that would require changes to the BarrierSet classes of all GCs. So I leave that for next release.

      2) The size parameter of the TypeFunc for the runtime call has the wrong type. It was originally Long but missed the upper Half, it was fixed to INT (JDK-8233834), but that is wrong and causes the compiles to be skipped. We didn't notice that since they failed silently. That is also why we didn't notice problem #1 too.




        Attachments

          Issue Links

            Activity

              People

              Assignee:
              neliasso Nils Eliasson
              Reporter:
              neliasso Nils Eliasson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: