8186777: Make Klass::_java_mirror an OopHandle

Add indirection for fetching mirror so that GC doesn't have to follow CLD::_klasses

Co-authored-by: Rickard Backman <rickard.backman@oracle.com>
Reviewed-by: hseigel, thartmann, eosterlund, stefank
This commit is contained in:
Coleen Phillimore 2017-10-03 16:42:04 -04:00
parent e31bc5637a
commit 73a801bc43
61 changed files with 383 additions and 477 deletions

View file

@ -285,6 +285,9 @@ void InstanceKlass::deallocate_contents(ClassLoaderData* loader_data) {
java_lang_Class::set_klass(java_mirror(), NULL);
}
// Also remove mirror from handles
loader_data->remove_handle(_java_mirror);
// Need to take this class off the class loader data list.
loader_data->remove_class(this);