Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
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.
|