JDK-8273712 : C2: Add mechanism for rejecting inlining of low frequency call sites and deprecate MinInliningThreshold.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-14
  • Updated: 2024-05-30
  • Resolved: 2021-10-25
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 18
18 b21Fixed
Related Reports
CSR :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Currently the inlining heuristic uses absolute method invocation count to reject methods that are rarely executed (see MinInliningThreshold and its uses).
This presents two problems:
1. Method can be rarely used in a particular caller, yet if its total execution count is high it may be still inlined.
2. The use of absolute counts is inherently problematic with the current compilation policy (adaptive threshold and background compilation). It leads to instabilities of inlining decisions.

The proposed solution is to consider call site execution ratio in order to reject callees that are rarely executed. Set the old cutoff parameter (MinInliningThreshold) to 0 to essentially disable it and later deprecate it.

Setting the introduced MinInlineFrequencyRatio = 0.0085 produces the following notable improvements:
Renaissance-Dotty 1.23%
Renaissance-Mnemonics 3.88%
Renaissance-NaiveBayes 9.23%
Renaissance-ScalaKmeans 1.36%
SPECjvm2008-Derby 3.16%

There are of course some regressions but those are few and on the order of 1.5%


Comments
Changeset: 89671aa1 Author: Igor Veresov <iveresov@openjdk.org> Date: 2021-10-25 17:03:57 +0000 URL: https://git.openjdk.java.net/jdk/commit/89671aa164ea500954b0d5caa5ce6190dfbc0d4e
25-10-2021