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

Type profiles need to be extended to capture some static arguments

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 7, 9, 10
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      As a follow-on to 6912064 in support of dynamically typed languages, the JVM's type profile needs to capture type information for at least a leading reference operand to an invokedynamic instruction.

      If there is no leading reference operand, then either the first leading reference operand (if any) should be profiled, or no profile should be collected.

      Also, as long as we're profiling non-receivers for invokedynamic, let's do it for the other invoke bytecodes also, at least invokestatic. This should help us better optimize factory methods and other receiver-free patterns.

      We can also profile return values. This will have less benefit than receiver profiling, since if a return value type is useful, it is often used in the context of a subsequent invocation on the object, which would have its own profile that would catch the type. But, in some cases, a profiled return value would be passed as a non-profiled (non-receiver) argument and used in the inlined body of the callee. Receiver profiling could reduce the impact of profile pollution (see JDK-8015416).

      Profiling more than one argument will require ReceiverTypeData records to include a size parameter. The footprint impact of such profiles may be costly. On the other hand, if profiles are only built for warm code the cost may be limited. Also, if profiles are built for tier one (compiled) code, each reference argument could be assigned its own ad hoc ReceiverTypeData structure.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jrose John Rose
              Reporter:
              jrose John Rose
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: