mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6552561: MaxRecursiveInlineLevel flag doesn't operate correctly
Reviewed-by: kvn, never
This commit is contained in:
parent
2683d5390b
commit
6bfb306487
1 changed files with 7 additions and 10 deletions
|
@ -310,13 +310,14 @@ const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_
|
||||||
return "inlining too deep";
|
return "inlining too deep";
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to detect recursive inlining of method handle targets: if
|
// detect direct and indirect recursive inlining
|
||||||
// the current method is a method handle adapter and one of the
|
{
|
||||||
// callers is the same method as the callee, we bail out if
|
// count the current method and the callee
|
||||||
// MaxRecursiveInlineLevel is hit.
|
int inline_level = (method() == callee_method) ? 1 : 0;
|
||||||
if (method()->is_method_handle_adapter()) {
|
if (inline_level > MaxRecursiveInlineLevel)
|
||||||
|
return "recursively inlining too deep";
|
||||||
|
// count callers of current method and callee
|
||||||
JVMState* jvms = caller_jvms();
|
JVMState* jvms = caller_jvms();
|
||||||
int inline_level = 0;
|
|
||||||
while (jvms != NULL && jvms->has_method()) {
|
while (jvms != NULL && jvms->has_method()) {
|
||||||
if (jvms->method() == callee_method) {
|
if (jvms->method() == callee_method) {
|
||||||
inline_level++;
|
inline_level++;
|
||||||
|
@ -327,10 +328,6 @@ const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method() == callee_method && inline_depth() > MaxRecursiveInlineLevel) {
|
|
||||||
return "recursively inlining too deep";
|
|
||||||
}
|
|
||||||
|
|
||||||
int size = callee_method->code_size();
|
int size = callee_method->code_size();
|
||||||
|
|
||||||
if (UseOldInlining && ClipInlining
|
if (UseOldInlining && ClipInlining
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue