-
Bug
-
Resolution: Fixed
-
P5
-
9
-
b34
With the testcase below, executed with latest hs-comp with:
java -XX:CompileOnly=TestCompileCommand::m1 -XX:CompileOnly=TestCompileCommand::m2 -XX:CompileCommand=quiet -XX:-BackgroundCompilation -XX:+PrintCompilation -XX:+PrintInlining -XX:-TieredCompilation TestCompileCommand
I get the following output:
170 1 b TestCompileCommand::m1 (4 bytes)
@ 0 TestCompileCommand::m1_notinlined (1 bytes) not compilable (disabled)
170 2 b TestCompileCommand::m2 (8 bytes)
@ 4 TestCompileCommand::m2_notinlined (1 bytes) inline (hot)
Either both m1_notinlined & m2_notinlined should be inlined or neither should be.
public class TestCompileCommand {
static void m1_notinlined() {
}
static void m1() {
m1_notinlined();
}
static void m2_notinlined() {
}
static void m2(boolean flag) {
if (flag) {
m2_notinlined();
}
}
static public void main(String[] args) {
for (int i = 0; i < 20000; i++) {
m1_notinlined();
m1_notinlined();
m1();
m2((i%2) == 0);
}
}
}
java -XX:CompileOnly=TestCompileCommand::m1 -XX:CompileOnly=TestCompileCommand::m2 -XX:CompileCommand=quiet -XX:-BackgroundCompilation -XX:+PrintCompilation -XX:+PrintInlining -XX:-TieredCompilation TestCompileCommand
I get the following output:
170 1 b TestCompileCommand::m1 (4 bytes)
@ 0 TestCompileCommand::m1_notinlined (1 bytes) not compilable (disabled)
170 2 b TestCompileCommand::m2 (8 bytes)
@ 4 TestCompileCommand::m2_notinlined (1 bytes) inline (hot)
Either both m1_notinlined & m2_notinlined should be inlined or neither should be.
public class TestCompileCommand {
static void m1_notinlined() {
}
static void m1() {
m1_notinlined();
}
static void m2_notinlined() {
}
static void m2(boolean flag) {
if (flag) {
m2_notinlined();
}
}
static public void main(String[] args) {
for (int i = 0; i < 20000; i++) {
m1_notinlined();
m1_notinlined();
m1();
m2((i%2) == 0);
}
}
}
- relates to
-
JDK-8191688 Assert failed in > 200 tests: failed dependencies, but counter didn't change
-
- Closed
-
-
JDK-8336258 Document the behavior of 'exclude' and 'compileonly' with respect to inlining
-
- Resolved
-