mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8073705: more performance issues in class redefinition
Optimize the method pointer adjustments for prev klass versions and MNT Reviewed-by: dcubed, coleenp
This commit is contained in:
parent
8cb760c280
commit
f7c143cbb2
7 changed files with 36 additions and 94 deletions
|
@ -2831,33 +2831,6 @@ bool java_lang_invoke_MemberName::is_method(oop mname) {
|
|||
return (flags(mname) & (MN_IS_METHOD | MN_IS_CONSTRUCTOR)) > 0;
|
||||
}
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
// Can be executed on VM thread only
|
||||
void java_lang_invoke_MemberName::adjust_vmtarget(oop mname, Method* old_method,
|
||||
Method* new_method, bool* trace_name_printed) {
|
||||
assert(is_method(mname), "wrong type");
|
||||
assert(Thread::current()->is_VM_thread(), "not VM thread");
|
||||
|
||||
Method* target = (Method*)mname->address_field(_vmtarget_offset);
|
||||
if (target == old_method) {
|
||||
mname->address_field_put(_vmtarget_offset, (address)new_method);
|
||||
|
||||
if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
|
||||
if (!(*trace_name_printed)) {
|
||||
// RC_TRACE_MESG macro has an embedded ResourceMark
|
||||
RC_TRACE_MESG(("adjust: name=%s",
|
||||
old_method->method_holder()->external_name()));
|
||||
*trace_name_printed = true;
|
||||
}
|
||||
// RC_TRACE macro has an embedded ResourceMark
|
||||
RC_TRACE(0x00400000, ("MemberName method update: %s(%s)",
|
||||
new_method->name()->as_C_string(),
|
||||
new_method->signature()->as_C_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_JVMTI
|
||||
|
||||
void java_lang_invoke_MemberName::set_vmtarget(oop mname, Metadata* ref) {
|
||||
assert(is_instance(mname), "wrong type");
|
||||
// check the type of the vmtarget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue