hotspot/src/share/vm/prims/jvm.cpp
changeset 38151 fffedc5e5cf8
parent 38118 16e2f219e1b6
child 38303 1d0016127806
equal deleted inserted replaced
38150:22d89ca22f98 38151:fffedc5e5cf8
   208     if (to_class != caller) {
   208     if (to_class != caller) {
   209       const char * from = caller->external_name();
   209       const char * from = caller->external_name();
   210       const char * to = to_class->external_name();
   210       const char * to = to_class->external_name();
   211       // print in a single call to reduce interleaving between threads
   211       // print in a single call to reduce interleaving between threads
   212       if (source_file != NULL) {
   212       if (source_file != NULL) {
   213         log_debug(classresolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
   213         log_debug(class, resolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
   214       } else {
   214       } else {
   215         log_debug(classresolve)("%s %s (%s)", from, to, trace);
   215         log_debug(class, resolve)("%s %s (%s)", from, to, trace);
   216       }
   216       }
   217     }
   217     }
   218   }
   218   }
   219 }
   219 }
   220 
   220 
   803   Klass* k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);
   803   Klass* k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);
   804   if (k == NULL) {
   804   if (k == NULL) {
   805     return NULL;
   805     return NULL;
   806   }
   806   }
   807 
   807 
   808   if (log_is_enabled(Debug, classresolve)) {
   808   if (log_is_enabled(Debug, class, resolve)) {
   809     trace_class_resolution(k);
   809     trace_class_resolution(k);
   810   }
   810   }
   811   return (jclass) JNIHandles::make_local(env, k->java_mirror());
   811   return (jclass) JNIHandles::make_local(env, k->java_mirror());
   812 JVM_END
   812 JVM_END
   813 
   813 
   840   Handle h_loader(THREAD, loader_oop);
   840   Handle h_loader(THREAD, loader_oop);
   841   Handle h_prot(THREAD, protection_domain);
   841   Handle h_prot(THREAD, protection_domain);
   842   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
   842   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
   843                                                h_prot, false, THREAD);
   843                                                h_prot, false, THREAD);
   844 
   844 
   845   if (log_is_enabled(Debug, classresolve) && result != NULL) {
   845   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
   846     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   846     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   847   }
   847   }
   848   return result;
   848   return result;
   849 JVM_END
   849 JVM_END
   850 
   850 
   870   Handle h_loader(THREAD, class_loader);
   870   Handle h_loader(THREAD, class_loader);
   871   Handle h_prot  (THREAD, protection_domain);
   871   Handle h_prot  (THREAD, protection_domain);
   872   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
   872   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
   873                                                h_prot, true, thread);
   873                                                h_prot, true, thread);
   874 
   874 
   875   if (log_is_enabled(Debug, classresolve) && result != NULL) {
   875   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
   876     // this function is generally only used for class loading during verification.
   876     // this function is generally only used for class loading during verification.
   877     ResourceMark rm;
   877     ResourceMark rm;
   878     oop from_mirror = JNIHandles::resolve_non_null(from);
   878     oop from_mirror = JNIHandles::resolve_non_null(from);
   879     Klass* from_class = java_lang_Class::as_Klass(from_mirror);
   879     Klass* from_class = java_lang_Class::as_Klass(from_mirror);
   880     const char * from_name = from_class->external_name();
   880     const char * from_name = from_class->external_name();
   881 
   881 
   882     oop mirror = JNIHandles::resolve_non_null(result);
   882     oop mirror = JNIHandles::resolve_non_null(result);
   883     Klass* to_class = java_lang_Class::as_Klass(mirror);
   883     Klass* to_class = java_lang_Class::as_Klass(mirror);
   884     const char * to = to_class->external_name();
   884     const char * to = to_class->external_name();
   885     log_debug(classresolve)("%s %s (verification)", from_name, to);
   885     log_debug(class, resolve)("%s %s (verification)", from_name, to);
   886   }
   886   }
   887 
   887 
   888   return result;
   888   return result;
   889 JVM_END
   889 JVM_END
   890 
   890 
   948                                                    class_loader,
   948                                                    class_loader,
   949                                                    protection_domain,
   949                                                    protection_domain,
   950                                                    &st,
   950                                                    &st,
   951                                                    CHECK_NULL);
   951                                                    CHECK_NULL);
   952 
   952 
   953   if (log_is_enabled(Debug, classresolve) && k != NULL) {
   953   if (log_is_enabled(Debug, class, resolve) && k != NULL) {
   954     trace_class_resolution(k);
   954     trace_class_resolution(k);
   955   }
   955   }
   956 
   956 
   957   return (jclass) JNIHandles::make_local(env, k->java_mirror());
   957   return (jclass) JNIHandles::make_local(env, k->java_mirror());
   958 }
   958 }