提交 1174ea5e 编写于 作者: V vlivanov

8049528: Method marked w/ @ForceInline isn't inlined with "executed <...

8049528: Method marked w/ @ForceInline isn't inlined with "executed < MinInliningThreshold times" message
Reviewed-by: roland, jrose
上级 88e51dd6
......@@ -107,7 +107,7 @@ bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
int caller_bci, ciCallProfile& profile,
WarmCallInfo* wci_result) {
// Allows targeted inlining
if(callee_method->should_inline()) {
if (callee_method->should_inline()) {
*wci_result = *(WarmCallInfo::always_hot());
if (C->print_inlining() && Verbose) {
CompileTask::print_inline_indent(inline_level());
......@@ -118,6 +118,12 @@ bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
return true;
}
if (callee_method->force_inline()) {
set_msg("force inline by annotation");
_forced_inline = true;
return true;
}
#ifndef PRODUCT
int inline_depth = inline_level()+1;
if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
......@@ -244,6 +250,11 @@ bool InlineTree::should_not_inline(ciMethod *callee_method,
}
#endif
if (callee_method->force_inline()) {
set_msg("force inline by annotation");
return false;
}
// Now perform checks which are heuristic
if (is_unboxing_method(callee_method, C)) {
......@@ -251,12 +262,10 @@ bool InlineTree::should_not_inline(ciMethod *callee_method,
return false;
}
if (!callee_method->force_inline()) {
if (callee_method->has_compiled_code() &&
callee_method->instructions_size() > InlineSmallCode) {
set_msg("already compiled into a big method");
return true;
}
if (callee_method->has_compiled_code() &&
callee_method->instructions_size() > InlineSmallCode) {
set_msg("already compiled into a big method");
return true;
}
// don't inline exception code unless the top method belongs to an
......@@ -349,7 +358,7 @@ bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
// Escape Analysis stress testing when running Xcomp or CTW:
// inline constructors even if they are not reached.
} else if (forced_inline()) {
// Inlining was forced by CompilerOracle or ciReplay
// Inlining was forced by CompilerOracle, ciReplay or annotation
} else if (profile.count() == 0) {
// don't inline unreached call sites
set_msg("call site not reached");
......
......@@ -142,7 +142,7 @@ public:
void print_value_on(outputStream* st) const PRODUCT_RETURN;
bool _forced_inline; // Inlining was forced by CompilerOracle or ciReplay
bool _forced_inline; // Inlining was forced by CompilerOracle, ciReplay or annotation
bool forced_inline() const { return _forced_inline; }
// Count number of nodes in this subtree
int count() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册