RFR: 8273712: C2: Add mechanism for rejecting inlining of low frequency call sites and deprecate MinInliningThreshold.

Igor Veresov iveresov at openjdk.java.net
Wed Oct 20 17:42:18 UTC 2021


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%

-------------

Commit messages:
 - Remove old option from a test
 - Make low frequency inling cutoff relative

Changes: https://git.openjdk.java.net/jdk/pull/6046/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6046&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273712
  Stats: 38 lines in 6 files changed: 16 ins; 4 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6046.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6046/head:pull/6046

PR: https://git.openjdk.java.net/jdk/pull/6046


More information about the hotspot-compiler-dev mailing list