JDK-8235673 : [C1, C2] Split inlining control flags
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-10
  • Updated: 2024-02-06
  • Resolved: 2020-05-18
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 15
15 b24Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8247692 :  
Description
C1 and C2 JIT compilers are using the same global inlining control flags:
MaxInlineSize
MaxTrivialSize
MaxInlineLevel
MaxRecursiveInlineLevel

There's a demand for tuning some of these settings (e.g. JDK-8234863). However, some settings may be good for C2, but bad for C1 or vice-versa.

C2 rather benefits from more inlining while C1 has issues with that.
C1 doesn't have the concept of uncommon traps so it compiles all paths. And it may have to use patching stubs if compiling paths which were never executed until compilation time.
Inlining more methods with cold paths which contain lots of variables may increase stack space usage for C1 frames.

A possibilty to discuss could be adding separate flags for C1:
product(intx, C1MaxInlineSize, 35, "The maximum bytecode size of a method to be inlined by C1")
product(intx, C1MaxTrivialSize, 6, "The maximum bytecode size of a trivial method to be inlined by C1")
product(intx, C1MaxInlineLevel, 9, "The maximum number of nested calls that are inlined by C1")
product(intx, C1MaxRecursiveInlineLevel, 1, "maximum number of nested recursive calls that are inlined by C1")

In addition to that, it may make sense to limit stack frame size impact for inlining decisions for C1 (by a new flag, e.g. called C1InlineStackLimit) and tuning C1 differently.

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/140c5adcabdd User: mdoerr Date: 2020-05-18 08:58:54 +0000
18-05-2020