United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7200001 failed C1 OSR compile doesn't get recompiled with C2
JDK-7200001 : failed C1 OSR compile doesn't get recompiled with C2

Details
Type:
Bug
Submit Date:
2012-09-20
Status:
Resolved
Updated Date:
2013-04-30
Project Name:
JDK
Resolved Date:
2012-09-25
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs25 (b03)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
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)

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/9191895df19d
                                     
2012-09-25
URL:   http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/9191895df19d
User:  kvn
Date:  2012-09-28 19:34:46 +0000

                                     
2012-09-28
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/9191895df19d
User:  amurillo
Date:  2012-09-28 22:30:08 +0000

                                     
2012-09-28
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 ] ###@###.###
                                     
2012-09-21



Hardware and Software, Engineered to Work Together