--- a/hotspot/src/share/vm/prims/jni.cpp Mon Mar 23 10:42:20 2009 -0400
+++ b/hotspot/src/share/vm/prims/jni.cpp Wed Mar 25 13:09:28 2009 -0400
@@ -301,6 +301,10 @@
klassOop k = SystemDictionary::resolve_from_stream(class_name, class_loader,
Handle(), &st, CHECK_NULL);
+ if (TraceClassResolution && k != NULL) {
+ trace_class_resolution(k);
+ }
+
cls = (jclass)JNIHandles::make_local(
env, Klass::cast(k)->java_mirror());
return cls;
@@ -365,6 +369,10 @@
result = find_class_from_class_loader(env, sym, true, loader,
protection_domain, true, thread);
+ if (TraceClassResolution && result != NULL) {
+ trace_class_resolution(java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(result)));
+ }
+
// If we were the first invocation of jni_FindClass, we enable compilation again
// rather than just allowing invocation counter to overflow and decay.
// Controlled by flag DelayCompilationDuringStartup.
@@ -2646,7 +2654,12 @@
Handle protection_domain; // null protection domain
symbolHandle sym = oopFactory::new_symbol_handle(name, CHECK_NULL);
- return find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
+ jclass result = find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
+
+ if (TraceClassResolution && result != NULL) {
+ trace_class_resolution(java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(result)));
+ }
+ return result;
}
// These lookups are done with the NULL (bootstrap) ClassLoader to