8160548: Inconsistent inlining behavior with CompileOnly

Can_be_compiled should not affect inlining

Reviewed-by: thartmann
This commit is contained in:
Nils Eliasson 2017-11-20 09:50:27 +01:00
parent acb7facf46
commit fc7955d5fc
3 changed files with 3 additions and 2 deletions

View File

@ -478,7 +478,6 @@ const char* InlineTree::check_can_parse(ciMethod* callee) {
// Certain methods cannot be parsed at all:
if ( callee->is_native()) return "native method";
if ( callee->is_abstract()) return "abstract method";
if (!callee->can_be_compiled()) return "not compilable (disabled)";
if (!callee->has_balanced_monitors()) return "not compilable (unbalanced monitors)";
if ( callee->get_flow_analysis()->failing()) return "not compilable (flow analysis failed)";
return NULL;

View File

@ -487,7 +487,7 @@ Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses)
log->elem("observe that='has_exception_handlers'");
}
assert(method()->can_be_compiled(), "Can not parse this method, cutout earlier");
assert(InlineTree::check_can_parse(method()) == NULL, "Can not parse this method, cutout earlier");
assert(method()->has_balanced_monitors(), "Can not parse unbalanced monitors, cutout earlier");
// Always register dependence if JVMTI is enabled, because

View File

@ -39,6 +39,7 @@
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
* -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method
* -XX:CompileCommand=dontinline,java.util.concurrent.Phaser::*
* -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
* compiler.whitebox.DeoptimizeFramesTest false
*/
@ -110,6 +111,7 @@ public class DeoptimizeFramesTest extends CompilerWhiteBoxTest {
String.format("compilation %d can't be available", nm.compile_id));
}
} else {
Asserts.assertNE(nm2, null, "must not be null");
Asserts.assertEQ(nm.compile_id, nm2.compile_id, "should be the same nmethod");
}
}