hotspot/src/share/vm/prims/jvmtiEventController.cpp
changeset 7897 201a8b00ec91
parent 7397 5b173b4ca846
child 8921 14bfe81f2a9d
equal deleted inserted replaced
7896:08aadd7aa3ee 7897:201a8b00ec91
   665 
   665 
   666 void
   666 void
   667 JvmtiEventControllerPrivate::thread_ended(JavaThread *thread) {
   667 JvmtiEventControllerPrivate::thread_ended(JavaThread *thread) {
   668   // Removes the JvmtiThreadState associated with the specified thread.
   668   // Removes the JvmtiThreadState associated with the specified thread.
   669   // May be called after all environments have been disposed.
   669   // May be called after all environments have been disposed.
       
   670   assert(JvmtiThreadState_lock->is_locked(), "sanity check");
   670 
   671 
   671   EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
   672   EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
   672 
   673 
   673   JvmtiThreadState *state = thread->jvmti_thread_state();
   674   JvmtiThreadState *state = thread->jvmti_thread_state();
   674   if (state != NULL) {
   675   assert(state != NULL, "else why are we here?");
   675     MutexLocker mu(JvmtiThreadState_lock);
   676   delete state;
   676     delete state;
       
   677   }
       
   678 }
   677 }
   679 
   678 
   680 void JvmtiEventControllerPrivate::set_event_callbacks(JvmtiEnvBase *env,
   679 void JvmtiEventControllerPrivate::set_event_callbacks(JvmtiEnvBase *env,
   681                                                       const jvmtiEventCallbacks* callbacks,
   680                                                       const jvmtiEventCallbacks* callbacks,
   682                                                       jint size_of_callbacks) {
   681                                                       jint size_of_callbacks) {