JDK-8267806 : C1: Relax inlining checks for not yet initialized classes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-05-26
  • Updated: 2022-01-05
  • Resolved: 2021-05-31
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 17
17 b25Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
The checks which guard inlining in C1 are too strong: declaring holder is required to be fully initialized while JVMS mandates an initialization barrier only in `invokestatic` case.
Comments
Changeset: 35916ed5 Author: Vladimir Ivanov <vlivanov@openjdk.org> Date: 2021-05-31 08:45:07 +0000 URL: https://git.openjdk.java.net/jdk/commit/35916ed57f425ea674de1e9d5023e7cf199a6740
31-05-2021

Just from a semantic perspective, as all the other invocation bytecodes have to apply to an instance, the class must have already been initialized before the instance could be created. Hence invokestatic is the only invocation bytecode that needs an explicit initialization barrier.
28-05-2021