diff -r f9536fc8548c -r 71c463a17b3b hotspot/src/share/vm/jvmci/jvmciRuntime.cpp --- a/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Tue Dec 22 19:33:01 2015 +0000 +++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Tue Dec 22 16:29:48 2015 -0500 @@ -31,6 +31,7 @@ #include "jvmci/jvmciCompiler.hpp" #include "jvmci/jvmciJavaClasses.hpp" #include "jvmci/jvmciEnv.hpp" +#include "logging/log.hpp" #include "memory/oopFactory.hpp" #include "oops/oop.inline.hpp" #include "oops/objArrayOop.inline.hpp" @@ -294,11 +295,15 @@ // debugging support // tracing - if (TraceExceptions) { - ttyLocker ttyl; + if (log_is_enabled(Info, exceptions)) { ResourceMark rm; - tty->print_cr("Exception <%s> (" INTPTR_FORMAT ") thrown in compiled method <%s> at PC " INTPTR_FORMAT " for thread " INTPTR_FORMAT "", - exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread)); + log_info(exceptions)("Exception <%s> (" INTPTR_FORMAT ") thrown in" + " compiled method <%s> at PC " INTPTR_FORMAT + " for thread " INTPTR_FORMAT, + exception->print_value_string(), + p2i((address)exception()), + nm->method()->print_value_string(), p2i(pc), + p2i(thread)); } // for AbortVMOnException flag NOT_PRODUCT(Exceptions::debug_check_abort(exception)); @@ -323,11 +328,11 @@ // Set flag if return address is a method handle call site. thread->set_is_method_handle_return(nm->is_method_handle_return(pc)); - if (TraceExceptions) { - ttyLocker ttyl; + if (log_is_enabled(Info, exceptions)) { ResourceMark rm; - tty->print_cr("Thread " PTR_FORMAT " continuing at PC " PTR_FORMAT " for exception thrown at PC " PTR_FORMAT, - p2i(thread), p2i(continuation), p2i(pc)); + log_info(exceptions)("Thread " PTR_FORMAT " continuing at PC " PTR_FORMAT + " for exception thrown at PC " PTR_FORMAT, + p2i(thread), p2i(continuation), p2i(pc)); } return continuation;