This commit is contained in:
Jesper Wilhelmsson 2016-03-23 23:36:29 +01:00
commit b7ca1e57ee
255 changed files with 6692 additions and 5051 deletions

View file

@ -210,9 +210,9 @@ static void trace_class_resolution_impl(Klass* to_class, TRAPS) {
const char * to = to_class->external_name();
// print in a single call to reduce interleaving between threads
if (source_file != NULL) {
log_info(classresolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
log_debug(classresolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
} else {
log_info(classresolve)("%s %s (%s)", from, to, trace);
log_debug(classresolve)("%s %s (%s)", from, to, trace);
}
}
}
@ -518,19 +518,13 @@ JVM_ENTRY(void, JVM_FillInStackTrace(JNIEnv *env, jobject receiver))
JVM_END
JVM_ENTRY(jint, JVM_GetStackTraceDepth(JNIEnv *env, jobject throwable))
JVMWrapper("JVM_GetStackTraceDepth");
oop exception = JNIHandles::resolve(throwable);
return java_lang_Throwable::get_stack_trace_depth(exception, THREAD);
JVM_END
JVM_ENTRY(jobject, JVM_GetStackTraceElement(JNIEnv *env, jobject throwable, jint index))
JVMWrapper("JVM_GetStackTraceElement");
JvmtiVMObjectAllocEventCollector oam; // This ctor (throughout this module) may trigger a safepoint/GC
oop exception = JNIHandles::resolve(throwable);
oop element = java_lang_Throwable::get_stack_trace_element(exception, index, CHECK_NULL);
return JNIHandles::make_local(env, element);
JVM_ENTRY(void, JVM_GetStackTraceElements(JNIEnv *env, jobject throwable, jobjectArray stackTrace))
JVMWrapper("JVM_GetStackTraceElements");
Handle exception(THREAD, JNIHandles::resolve(throwable));
objArrayOop st = objArrayOop(JNIHandles::resolve(stackTrace));
objArrayHandle stack_trace(THREAD, st);
// Fill in the allocated stack trace
java_lang_Throwable::get_stack_trace_elements(exception, stack_trace, CHECK);
JVM_END
@ -839,7 +833,7 @@ JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
return NULL;
}
if (log_is_enabled(Info, classresolve)) {
if (log_is_enabled(Debug, classresolve)) {
trace_class_resolution(k);
}
return (jclass) JNIHandles::make_local(env, k->java_mirror());
@ -876,7 +870,7 @@ JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, false, THREAD);
if (log_is_enabled(Info, classresolve) && result != NULL) {
if (log_is_enabled(Debug, classresolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
}
return result;
@ -906,7 +900,7 @@ JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, true, thread);
if (log_is_enabled(Info, classresolve) && result != NULL) {
if (log_is_enabled(Debug, classresolve) && result != NULL) {
// this function is generally only used for class loading during verification.
ResourceMark rm;
oop from_mirror = JNIHandles::resolve_non_null(from);
@ -916,7 +910,7 @@ JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
oop mirror = JNIHandles::resolve_non_null(result);
Klass* to_class = java_lang_Class::as_Klass(mirror);
const char * to = to_class->external_name();
log_info(classresolve)("%s %s (verification)", from_name, to);
log_debug(classresolve)("%s %s (verification)", from_name, to);
}
return result;
@ -984,7 +978,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name,
&st,
CHECK_NULL);
if (log_is_enabled(Info, classresolve) && k != NULL) {
if (log_is_enabled(Debug, classresolve) && k != NULL) {
trace_class_resolution(k);
}