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

Improve performance of Method.copy() and leafCopy()

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Method.copy() and leafCopy() creates a copy of a Method object with sharing MethodAccessor object. Since the methodAccessor field is a volatile variable, copying this field needs memory fence to ensure the field is visible to all threads on the weak memory platforms such as POWER and ARM.

      When the methodAccessor of the root object is null (i.e., not initialized yet), we do not need to copy the null value because this field of the copied object has been initialized to null in the constructor. We can reduce overhead of the memory fence only when the root's methodAccessor is non-null.

        Attachments

          Activity

            People

            • Assignee:
              ogatak Kazunori Ogata
              Reporter:
              ogatak Kazunori Ogata
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: