mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
Only do full metadata walk during class redefinition and only walk handles during class unloading. Reviewed-by: sspitsyn, stefank
This commit is contained in:
parent
984cf4c9b5
commit
7b384c6958
19 changed files with 147 additions and 248 deletions
|
@ -142,14 +142,11 @@ void VM_RedefineClasses::doit() {
|
|||
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
redefine_single_class(_class_defs[i].klass, _scratch_classes[i], thread);
|
||||
ClassLoaderData* cld = _scratch_classes[i]->class_loader_data();
|
||||
// Free the memory for this class at class unloading time. Not before
|
||||
// because CMS might think this is still live.
|
||||
cld->add_to_deallocate_list((InstanceKlass*)_scratch_classes[i]);
|
||||
_scratch_classes[i] = NULL;
|
||||
}
|
||||
|
||||
// Clean out MethodData pointing to old Method*
|
||||
// Have to do this after all classes are redefined and all methods that
|
||||
// are redefined are marked as old.
|
||||
MethodDataCleaner clean_weak_method_links;
|
||||
ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue