mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7071307: MethodHandle bimorphic inlining should consider the frequency
Reviewed-by: twisti, roland, kvn, iveresov
This commit is contained in:
parent
1038fed51d
commit
32fd1b087d
20 changed files with 346 additions and 61 deletions
|
@ -141,7 +141,21 @@ const char* InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_
|
|||
assert(mha_profile, "must exist");
|
||||
CounterData* cd = mha_profile->as_CounterData();
|
||||
invoke_count = cd->count();
|
||||
call_site_count = invoke_count; // use the same value
|
||||
if (invoke_count == 0) {
|
||||
return "method handle not reached";
|
||||
}
|
||||
|
||||
if (_caller_jvms != NULL && _caller_jvms->method() != NULL &&
|
||||
_caller_jvms->method()->method_data() != NULL &&
|
||||
!_caller_jvms->method()->method_data()->is_empty()) {
|
||||
ciMethodData* mdo = _caller_jvms->method()->method_data();
|
||||
ciProfileData* mha_profile = mdo->bci_to_data(_caller_jvms->bci());
|
||||
assert(mha_profile, "must exist");
|
||||
CounterData* cd = mha_profile->as_CounterData();
|
||||
call_site_count = cd->count();
|
||||
} else {
|
||||
call_site_count = invoke_count; // use the same value
|
||||
}
|
||||
}
|
||||
|
||||
assert(invoke_count != 0, "require invocation count greater than zero");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue