Exemplo n.º 1
0
 // retrieve or create JvmtiThreadState
 inline static JvmtiThreadState *state_for(JavaThread *thread) {
     JvmtiThreadState *state = thread->jvmti_thread_state();
     if (state == NULL) {
         MutexLocker mu(JvmtiThreadState_lock);
         // check again with the lock held
         state = state_for_while_locked(thread);
     }
     return state;
 }
 // retrieve or create JvmtiThreadState
 // Can return NULL if JavaThread is exiting.
 inline static JvmtiThreadState *state_for(JavaThread *thread) {
   JvmtiThreadState *state = thread->jvmti_thread_state();
   if (state == NULL) {
     MutexLocker mu(JvmtiThreadState_lock);
     // check again with the lock held
     state = state_for_while_locked(thread);
   } else {
     CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
   }
   return state;
 }