JDK-7200001 : failed C1 OSR compile doesn't get recompiled with C2
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-09-20
  • Updated: 2013-06-26
  • Resolved: 2012-09-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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
When a C1 OSR compile bails out we don't recompile the method in C2 which it should:

   3661    3 %     3       com.oracle.nashorn.scripts.Script$mult::bench @ 21 (143 bytes)   COMPILED SKIPPED: unlinked call site (FIXME needs patching or recompile support) (retry at different tier)

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/9191895df19d

EVALUATION The problem is that we only have one flag that indicates a method is not OSR compilable: JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000, Unlike for normal compiles where we have a flag for each compiler: JVM_ACC_NOT_C2_COMPILABLE = 0x02000000, JVM_ACC_NOT_C1_COMPILABLE = 0x04000000, The fix is to set not-OSR-compilable for the current compile level and not any level. Since this problem occurs very rarely as C1 usually can compile all methods we set a method not-C1-compilable when it's not-C1-OSR-compilable: void set_not_c1_osr_compilable() { set_not_c1_compilable(); } and wait for C2 to compile it. If this shows a problem in the future we can sacrifice another bit in the flags. *** (#1 of 1): [ UNSAVED ] ###@###.###