提交 85294099 编写于 作者: V vlivanov

8012941: JSR 292: too deep inlining might crash compiler because of stack overflow

Reviewed-by: kvn, twisti
上级 7d9e0152
...@@ -3768,6 +3768,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode ...@@ -3768,6 +3768,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode
// now perform tests that are based on flag settings // now perform tests that are based on flag settings
if (callee->force_inline()) { if (callee->force_inline()) {
if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
print_inlining(callee, "force inline by annotation"); print_inlining(callee, "force inline by annotation");
} else if (callee->should_inline()) { } else if (callee->should_inline()) {
print_inlining(callee, "force inline by CompileOracle"); print_inlining(callee, "force inline by CompileOracle");
......
...@@ -341,6 +341,8 @@ ...@@ -341,6 +341,8 @@
diagnostic(bool, C1PatchInvokeDynamic, true, \ diagnostic(bool, C1PatchInvokeDynamic, true, \
"Patch invokedynamic appendix not known at compile time") \ "Patch invokedynamic appendix not known at compile time") \
\ \
develop(intx, MaxForceInlineLevel, 100, \
"maximum number of nested @ForceInline calls that are inlined") \
\ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册