mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8008511: JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
Lazily create and maintain the MemberNameTable to be able to update MemberName's Reviewed-by: coleenp, jrose, dholmes
This commit is contained in:
parent
46b3969016
commit
87f3086e13
9 changed files with 231 additions and 58 deletions
|
@ -2329,6 +2329,12 @@ void InstanceKlass::release_C_heap_structures() {
|
|||
FreeHeap(jmeths);
|
||||
}
|
||||
|
||||
MemberNameTable* mnt = member_names();
|
||||
if (mnt != NULL) {
|
||||
delete mnt;
|
||||
set_member_names(NULL);
|
||||
}
|
||||
|
||||
int* indices = methods_cached_itable_indices_acquire();
|
||||
if (indices != (int*)NULL) {
|
||||
release_set_methods_cached_itable_indices(NULL);
|
||||
|
@ -2757,6 +2763,17 @@ nmethod* InstanceKlass::lookup_osr_nmethod(Method* const m, int bci, int comp_le
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void InstanceKlass::add_member_name(Handle mem_name) {
|
||||
jweak mem_name_wref = JNIHandles::make_weak_global(mem_name);
|
||||
MutexLocker ml(MemberNameTable_lock);
|
||||
DEBUG_ONLY(No_Safepoint_Verifier nsv);
|
||||
|
||||
if (_member_names == NULL) {
|
||||
_member_names = new (ResourceObj::C_HEAP, mtClass) MemberNameTable();
|
||||
}
|
||||
_member_names->add_member_name(mem_name_wref);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// Printing
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue