< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page

        

*** 147,159 **** _java_platform_loader = (oop)result.get_jobject(); CDS_ONLY(SystemDictionaryShared::initialize(CHECK);) } ! ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) { if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data(); ! return ClassLoaderDataGraph::find_or_create(class_loader, THREAD); } // ---------------------------------------------------------------------------- // Parallel class loading check --- 147,159 ---- _java_platform_loader = (oop)result.get_jobject(); CDS_ONLY(SystemDictionaryShared::initialize(CHECK);) } ! ClassLoaderData* SystemDictionary::register_loader(Handle class_loader) { if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data(); ! return ClassLoaderDataGraph::find_or_create(class_loader); } // ---------------------------------------------------------------------------- // Parallel class loading check
*** 661,671 **** HandleMark hm(THREAD); // Fix for 4474172; see evaluation for more details class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader())); ! ClassLoaderData *loader_data = register_loader(class_loader, CHECK_NULL); Dictionary* dictionary = loader_data->dictionary(); unsigned int d_hash = dictionary->compute_hash(name); // Do lookup to see if class already exist and the protection domain // has the right access --- 661,671 ---- HandleMark hm(THREAD); // Fix for 4474172; see evaluation for more details class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader())); ! ClassLoaderData* loader_data = register_loader(class_loader); Dictionary* dictionary = loader_data->dictionary(); unsigned int d_hash = dictionary->compute_hash(name); // Do lookup to see if class already exist and the protection domain // has the right access
*** 986,996 **** ClassLoaderData* loader_data; if (host_klass != NULL) { // Create a new CLD for anonymous class, that uses the same class loader // as the host_klass guarantee(host_klass->class_loader() == class_loader(), "should be the same"); ! loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader(), CHECK_NULL); } else { loader_data = ClassLoaderData::class_loader_data(class_loader()); } assert(st != NULL, "invariant"); --- 986,996 ---- ClassLoaderData* loader_data; if (host_klass != NULL) { // Create a new CLD for anonymous class, that uses the same class loader // as the host_klass guarantee(host_klass->class_loader() == class_loader(), "should be the same"); ! loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader); } else { loader_data = ClassLoaderData::class_loader_data(class_loader()); } assert(st != NULL, "invariant");
*** 1073,1083 **** bool DoObjectLock = true; if (is_parallelCapable(class_loader)) { DoObjectLock = false; } ! ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL); // Make sure we are synchronized on the class loader before we proceed Handle lockObject = compute_loader_lock_object(class_loader, THREAD); check_loader_lock_contention(lockObject, THREAD); ObjectLocker ol(lockObject, THREAD, DoObjectLock); --- 1073,1083 ---- bool DoObjectLock = true; if (is_parallelCapable(class_loader)) { DoObjectLock = false; } ! ClassLoaderData* loader_data = register_loader(class_loader); // Make sure we are synchronized on the class loader before we proceed Handle lockObject = compute_loader_lock_object(class_loader, THREAD); check_loader_lock_contention(lockObject, THREAD); ObjectLocker ol(lockObject, THREAD, DoObjectLock);
*** 2511,2525 **** tty->cr(); #endif //PRODUCT } (*appendix_result) = Handle(THREAD, appendix); // the target is stored in the cpCache and if a reference to this ! // MethodName is dropped we need a way to make sure the // class_loader containing this method is kept alive. - // FIXME: the appendix might also preserve this dependency. ClassLoaderData* this_key = accessing_klass->class_loader_data(); ! this_key->record_dependency(m->method_holder(), CHECK_NULL); // Can throw OOM return methodHandle(THREAD, m); } } THROW_MSG_(vmSymbols::java_lang_LinkageError(), "bad value from MethodHandleNatives", empty); return empty; --- 2511,2524 ---- tty->cr(); #endif //PRODUCT } (*appendix_result) = Handle(THREAD, appendix); // the target is stored in the cpCache and if a reference to this ! // MemberName is dropped we need a way to make sure the // class_loader containing this method is kept alive. ClassLoaderData* this_key = accessing_klass->class_loader_data(); ! this_key->record_dependency(m->method_holder()); return methodHandle(THREAD, m); } } THROW_MSG_(vmSymbols::java_lang_LinkageError(), "bad value from MethodHandleNatives", empty); return empty;
< prev index next >