void JniCallbackBase::CheckAndLogJavaException(JNIEnv* env) const { if (env->ExceptionCheck()) { JniLocalReference<jthrowable> throwable(env, env->ExceptionOccurred()); env->ExceptionClear(); LogException(env, *throwable); } }
void VM_ThreadStop::doit() { assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint"); JavaThread* target = java_lang_Thread::thread(target_thread()); // Note that this now allows multiple ThreadDeath exceptions to be // thrown at a thread. if (target != NULL) { // the thread has run and is not already in the process of exiting target->send_thread_stop(throwable()); } }
void VM_ThreadStop::doit() { assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint"); JavaThread* target = java_lang_Thread::thread(target_thread()); // Note that this now allows multiple ThreadDeath exceptions to be // thrown at a thread. if (target != NULL) { // the thread has run and is not already in the process of exiting printf("%s[%d] [tid: %lu]: 试图终止线程[%s]...\n", __FILE__, __LINE__, pthread_self(), target->name()); target->send_thread_stop(throwable()); } }