diff -r 2cc1ae79b303 src/hotspot/share/interpreter/interpreterRuntime.cpp --- a/src/hotspot/share/interpreter/interpreterRuntime.cpp Thu Dec 13 11:05:22 2018 -0800 +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp Thu Dec 20 12:46:29 2018 -0800 @@ -48,6 +48,7 @@ #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" #include "prims/jvmtiExport.hpp" +#include "prims/jvmtiTrace.hpp" #include "prims/nativeLookup.hpp" #include "runtime/atomic.hpp" #include "runtime/biasedLocking.hpp" @@ -491,6 +492,11 @@ LastFrameAccessor last_frame(thread); Handle h_exception(thread, exception); methodHandle h_method (thread, last_frame.method()); + + { ResourceMark rm; + log_info(jvmti)("[InterpreterRuntime::exception_handler_for_exception] Thread:%s, method: %s, class: %s, is_compiled: %s, is_deoptimized: %s", JvmtiTrace::safe_get_thread_name(thread),h_method()->name()->as_C_string(), h_method()->klass_name()->as_C_string(), last_frame.get_frame().is_compiled_frame() ? "true" : "false", last_frame.get_frame().is_deoptimized_frame()? "true":"false"); + + } constantPoolHandle h_constants(thread, h_method->constants()); bool should_repeat; int handler_bci; diff -r 2cc1ae79b303 test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001.java --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001.java Thu Dec 13 11:05:22 2018 -0800 +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001.java Thu Dec 20 12:46:29 2018 -0800 @@ -50,6 +50,7 @@ } public static int run(String args[], PrintStream out) { - return check(); + // Temporary make test always failing to see the diagnostic output for both failing and correct cases + return check() + 2; } } diff -r 2cc1ae79b303 test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001/exception001.cpp --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001/exception001.cpp Thu Dec 13 11:05:22 2018 -0800 +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001/exception001.cpp Thu Dec 20 12:46:29 2018 -0800 @@ -61,7 +61,7 @@ static jvmtiCapabilities caps; static jvmtiEventCallbacks callbacks; static jint result = PASSED; -static jboolean printdump = JNI_FALSE; +static jboolean printdump = JNI_TRUE; static exceptionInfo exs[] = { { "Lnsk/jvmti/Exception/exception001c;", "Lnsk/jvmti/Exception/exception001b;", "meth1", "()V", 7, @@ -287,7 +287,9 @@ result = STATUS_FAILED; } + printf("Before calling exception001a.run() ...\n"); env->CallStaticVoidMethod(clz, mid); + printf("After calling exception001a.run() ...\n"); err = jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, thread);