JDK-8270926 : C1 does not inline when it could
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,11,17,18,19
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2021-07-20
  • Updated: 2022-01-21
  • Resolved: 2022-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19Resolved
Related Reports
Duplicate :  
Description
C1 inlining checks that the declared "callee holder" is linked, which can result in a failure to inline in some situations:
1. invokedynamic, which relies on old code in ciBytecodeStream::get_declared_method_holder() that forces the holder to be java.lang.invoke.MethodHandle, even though the actual callee is a special generated method like java/lang/invoke/Invokers$Holder.linkToTargetMethod().
2. when the declared holder is not linked but the holder of the actual target method is linked
Comments
[~dlong] yes, it does look the same to me. I'll close it as a duplicate.
21-01-2022

[~vlivanov], I knew JDK-8279515 sounded familiar. Please confirm if this is a duplicate. Thanks.
21-01-2022

I'm changing this into a performance RFE as we are just missing some inline opportunities.
03-11-2021

Case 1 for invokedynamic seem to be rare, because MethodHandle native methods are usually used early during startup. My test case was using -XX:CompileOnly, -Xcomp, and String concat, which allowed an invokedynamic to get compiled before MethodHandle was linked.
22-07-2021

ILW = LHH = P4
20-07-2021