JDK-8148994 : Replacing MH::invokeBasic with a direct call breaks LF customization
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2016-02-04
  • Updated: 2016-03-03
  • Resolved: 2016-02-15
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 9
9 b108Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
9b103 has a serious performance regressions of octane benchmarks (nashorn). 

Particularly a large  performance regression is observed on Richards and DeltaBlue.
it's proved that regression on Richards is caused by JDK-8072008 commit.
Looks like DeltaBlue has the same regression source.
Inline of the following MH methods were broken:
- java.lang.invoke.LambdaForm$MH::guard
- java.lang.invoke.MethodHandle::invokeBasic
- java.lang.invoke.LambdaForm$BMH::reinvoke
- java.lang.invoke.LambdaForm$MH::delegate

Comments
List of hot methods (and score) after the JDK-8072008 commit: ....[Hottest Methods (after inlining)].............................................................. 18.05% 14.76% jdk.nashorn.internal.scripts.Script$Recompilation$47$6641$\^eval\_::schedule 11.22% 14.61% jdk.nashorn.internal.scripts.Script$Recompilation$46$10341$\^eval\_::run 10.33% 10.69% java.lang.invoke.LambdaForm$MH::guard 8.96% 9.08% jdk.nashorn.internal.scripts.Script$Recompilation$73$13983A$\^eval\_::run-4 8.42% 9.15% java.lang.invoke.MethodHandle::invokeBasic 7.04% 6.50% java.lang.invoke.LambdaForm$BMH::reinvoke 5.32% 5.88% java.lang.invoke.LambdaForm$MH::delegate 4.83% 5.66% jdk.nashorn.internal.scripts.Script$Recompilation$72$12418A$\^eval\_::run-2 3.38% 3.17% java.lang.invoke.LambdaForm$MH::exactInvoker 2.94% 1.86% jdk.nashorn.internal.scripts.Script$Recompilation$65$13182A$\^eval\_::run-3 2.77% 3.04% java.lang.invoke.LambdaForm$DMH::invokeStatic_L3_I 2.49% 3.35% jdk.nashorn.internal.runtime.ScriptFunction::isNonStrictFunction 1.94% 1.69% java.lang.invoke.LambdaForm$DMH::invokeVirtual_L_L 1.89% 1.64% [unknown] (perf-2430.map) 1.28% 1.50% java.lang.invoke.LambdaForm$MH::guardWithCatch 1.13% 0.51% <name unparseable> 0.94% 1.23% java.lang.invoke.LambdaForm$MH::identity_I 0.94% 0.48% java.lang.invoke.LambdaForm$DMH::invokeStatic_LL_L 0.88% 1.22% java.lang.invoke.LambdaForm$DMH::invokeStatic_L3_L 0.83% 0.59% [unknown] ([unknown]) 4.42% 3.31% <...other 84 warm methods...> .................................................................................................... 100.00% 99.91% <totals> Benchmark Mode Cnt Score Error Units RichardsBench.test avgt 5 970.585 �� 287.257 us/op
04-02-2016

List of hot methods (and score) before the JDK-8072008 commit: ....[Hottest Methods (after inlining)].............................................................. 31.67% 29.98% jdk.nashorn.internal.scripts.Script$Recompilation$47$6641$\^eval\_::schedule 24.67% 28.54% jdk.nashorn.internal.scripts.Script$Recompilation$46$10341$\^eval\_::run 15.48% 13.79% jdk.nashorn.internal.scripts.Script$Recompilation$73$13983A$\^eval\_::run-4 10.68% 10.55% jdk.nashorn.internal.scripts.Script$Recompilation$72$12418A$\^eval\_::run-2 5.45% 5.90% sun.reflect.ClassFileAssembler::cpi 4.93% 5.06% jdk.nashorn.internal.scripts.Script$Recompilation$55$8180A$\^eval\_::queue 4.19% 3.61% [unknown] ([unknown]) 1.08% 1.51% java.lang.invoke.MethodHandle::linkToStatic 0.32% 0.08% jdk.nashorn.internal.scripts.Script$Recompilation$16$2023$\^eval\_::runRichards 0.15% 0.07% <unresolved> 0.13% 0.03% java.util.Objects::requireNonNull 0.11% 0.07% jdk.nashorn.internal.objects.NativeArray::construct 0.10% 0.20% _ZN9xmlStream10write_textEPKcm (libjvm.so) 0.10% 0.05% jdk.nashorn.internal.scripts.Script$Recompilation$22$6363IIAA$\^eval\_::addTask 0.08% 0.02% [unknown] (perf-2300.map) 0.07% 0.06% _ZN9xmlStream10write_textEPKcm; _ZN13xmlTextStream5writeEPKcm (libjvm.so) 0.06% 0.02% java.lang.invoke.MethodHandle::invokeBasic 0.04% 0.04% jdk.nashorn.internal.runtime.GlobalConstants::invalidateAll 0.04% 0.04% jdk.nashorn.internal.scripts.Script$Recompilation$25$15235AII$\^eval\_::Packet 0.03% 0.01% _ZN4UTF815as_quoted_asciiEPKciPci (libjvm.so) 0.63% 0.32% <...other 80 warm methods...> .................................................................................................... 99.99% 99.94% <totals> Benchmark Mode Cnt Score Error Units RichardsBench.test avgt 5 452.879 �� 150.042 us/op
04-02-2016