< prev index next >

src/share/vm/runtime/java.cpp

Print this page

        

*** 395,405 **** #endif // Note: before_exit() can be executed only once, if more than one threads // are trying to shutdown the VM at the same time, only one thread // can run before_exit() and all other threads must wait. ! void before_exit(JavaThread * thread) { #define BEFORE_EXIT_NOT_RUN 0 #define BEFORE_EXIT_RUNNING 1 #define BEFORE_EXIT_DONE 2 static jint volatile _before_exit_status = BEFORE_EXIT_NOT_RUN; --- 395,405 ---- #endif // Note: before_exit() can be executed only once, if more than one threads // are trying to shutdown the VM at the same time, only one thread // can run before_exit() and all other threads must wait. ! void before_exit(JavaThread* thread) { #define BEFORE_EXIT_NOT_RUN 0 #define BEFORE_EXIT_RUNNING 1 #define BEFORE_EXIT_DONE 2 static jint volatile _before_exit_status = BEFORE_EXIT_NOT_RUN;
*** 423,433 **** return; } } #if INCLUDE_JVMCI ! JVMCIRuntime::shutdown(); #endif // Hang forever on exit if we're reporting an error. if (ShowMessageBoxOnError && is_error_reported()) { os::infinite_sleep(); --- 423,441 ---- return; } } #if INCLUDE_JVMCI ! // We are not using CATCH here because we want the exit to continue normally. ! Thread* THREAD = thread; ! JVMCIRuntime::shutdown(THREAD); ! if (HAS_PENDING_EXCEPTION) { ! Handle exception(THREAD, PENDING_EXCEPTION); ! CLEAR_PENDING_EXCEPTION; ! ttyLocker ttyl; ! java_lang_Throwable::print_stack_trace(exception, tty); ! } #endif // Hang forever on exit if we're reporting an error. if (ShowMessageBoxOnError && is_error_reported()) { os::infinite_sleep();
*** 608,620 **** // that no pending exceptions exist. Thread *THREAD = Thread::current(); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; } ! java_lang_Throwable::print(exception, tty); ! tty->cr(); ! java_lang_Throwable::print_stack_trace(exception(), tty); tty->cr(); vm_notify_during_shutdown(NULL, NULL); // Failure during initialization, we don't want to dump core vm_abort(false); --- 616,626 ---- // that no pending exceptions exist. Thread *THREAD = Thread::current(); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; } ! java_lang_Throwable::print_stack_trace(exception, tty); tty->cr(); vm_notify_during_shutdown(NULL, NULL); // Failure during initialization, we don't want to dump core vm_abort(false);
< prev index next >