mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +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
|
@ -2324,6 +2324,8 @@ int java_lang_invoke_BoundMethodHandle::_vmargslot_offset;
|
|||
|
||||
int java_lang_invoke_AdapterMethodHandle::_conversion_offset;
|
||||
|
||||
int java_lang_invoke_CountingMethodHandle::_vmcount_offset;
|
||||
|
||||
void java_lang_invoke_MethodHandle::compute_offsets() {
|
||||
klassOop k = SystemDictionary::MethodHandle_klass();
|
||||
if (k != NULL && EnableInvokeDynamic) {
|
||||
|
@ -2372,6 +2374,23 @@ void java_lang_invoke_AdapterMethodHandle::compute_offsets() {
|
|||
}
|
||||
}
|
||||
|
||||
void java_lang_invoke_CountingMethodHandle::compute_offsets() {
|
||||
klassOop k = SystemDictionary::CountingMethodHandle_klass();
|
||||
if (k != NULL && EnableInvokeDynamic) {
|
||||
compute_offset(_vmcount_offset, k, vmSymbols::vmcount_name(), vmSymbols::int_signature(), true);
|
||||
}
|
||||
}
|
||||
|
||||
int java_lang_invoke_CountingMethodHandle::vmcount(oop mh) {
|
||||
assert(is_instance(mh), "CMH only");
|
||||
return mh->int_field(_vmcount_offset);
|
||||
}
|
||||
|
||||
void java_lang_invoke_CountingMethodHandle::set_vmcount(oop mh, int count) {
|
||||
assert(is_instance(mh), "CMH only");
|
||||
mh->int_field_put(_vmcount_offset, count);
|
||||
}
|
||||
|
||||
oop java_lang_invoke_MethodHandle::type(oop mh) {
|
||||
return mh->obj_field(_type_offset);
|
||||
}
|
||||
|
@ -3043,6 +3062,7 @@ void JavaClasses::compute_offsets() {
|
|||
java_lang_invoke_MethodType::compute_offsets();
|
||||
java_lang_invoke_MethodTypeForm::compute_offsets();
|
||||
java_lang_invoke_CallSite::compute_offsets();
|
||||
java_lang_invoke_CountingMethodHandle::compute_offsets();
|
||||
}
|
||||
java_security_AccessControlContext::compute_offsets();
|
||||
// Initialize reflection classes. The layouts of these classes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue