Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8203585 | 11.0.1 | Igor Veresov | P3 | Resolved | Fixed | team |
While looking into an issue with a Graal bailout because the OSR entry point appeared to be unreachable I noticed that when C1 profiles if bytecodes it increments the backedge counter on every execution of the if instead of just on the backedge. For a simple loop like this:
public class dowhile {
public static void main(String[] args) {
for (int i = 0; i < 10000000; i++) {
testDoWhile();
}
}
public static volatile boolean repeatLoop;
static volatile int sideEffect;
public static void testDoWhile() {
do {
sideEffect++;
} while (repeatLoop);
}
}
HotSpot ends up requesting an OSR compile:
<task_queued compile_id='16' compile_kind='osr' method='dowhile testDoWhile ()V' bytes='15' count='224300' backedge_count='163840' iicount='224300' osr_bci='0' level='4' stamp='0.576' comment='tiered' hot_count='163840'/>
public class dowhile {
public static void main(String[] args) {
for (int i = 0; i < 10000000; i++) {
testDoWhile();
}
}
public static volatile boolean repeatLoop;
static volatile int sideEffect;
public static void testDoWhile() {
do {
sideEffect++;
} while (repeatLoop);
}
}
HotSpot ends up requesting an OSR compile:
<task_queued compile_id='16' compile_kind='osr' method='dowhile testDoWhile ()V' bytes='15' count='224300' backedge_count='163840' iicount='224300' osr_bci='0' level='4' stamp='0.576' comment='tiered' hot_count='163840'/>
- backported by
-
JDK-8203585 C1 does backedge profiling incorrectly
-
- Resolved
-
- relates to
-
JDK-8210392 assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit
-
- Resolved
-
-
JDK-8211100 HotSpot C1 issue with comparing long numbers on x86 32-bit
-
- Closed
-