hotspot/src/share/vm/prims/jvmtiThreadState.hpp
changeset 2135 f82c3012ec86
parent 2134 125f0fb7e9b1
child 4761 bdb7375a1fee
equal deleted inserted replaced
2134:125f0fb7e9b1 2135:f82c3012ec86
   312   bool has_last_frame()                     { return _thread->has_last_Java_frame(); }
   312   bool has_last_frame()                     { return _thread->has_last_Java_frame(); }
   313 
   313 
   314   void update_for_pop_top_frame();
   314   void update_for_pop_top_frame();
   315 
   315 
   316   // already holding JvmtiThreadState_lock - retrieve or create JvmtiThreadState
   316   // already holding JvmtiThreadState_lock - retrieve or create JvmtiThreadState
       
   317   // Can return NULL if JavaThread is exiting.
   317   inline static JvmtiThreadState *state_for_while_locked(JavaThread *thread) {
   318   inline static JvmtiThreadState *state_for_while_locked(JavaThread *thread) {
   318     assert(JvmtiThreadState_lock->is_locked(), "sanity check");
   319     assert(JvmtiThreadState_lock->is_locked(), "sanity check");
   319 
   320 
   320     JvmtiThreadState *state = thread->jvmti_thread_state();
   321     JvmtiThreadState *state = thread->jvmti_thread_state();
   321     if (state == NULL) {
   322     if (state == NULL) {
   328     }
   329     }
   329     return state;
   330     return state;
   330   }
   331   }
   331 
   332 
   332   // retrieve or create JvmtiThreadState
   333   // retrieve or create JvmtiThreadState
       
   334   // Can return NULL if JavaThread is exiting.
   333   inline static JvmtiThreadState *state_for(JavaThread *thread) {
   335   inline static JvmtiThreadState *state_for(JavaThread *thread) {
   334     JvmtiThreadState *state = thread->jvmti_thread_state();
   336     JvmtiThreadState *state = thread->jvmti_thread_state();
   335     if (state == NULL) {
   337     if (state == NULL) {
   336       MutexLocker mu(JvmtiThreadState_lock);
   338       MutexLocker mu(JvmtiThreadState_lock);
   337       // check again with the lock held
   339       // check again with the lock held