1.1 --- a/src/share/vm/runtime/thread.cpp Wed Mar 12 18:07:46 2008 -0700 1.2 +++ b/src/share/vm/runtime/thread.cpp Wed Mar 12 18:09:34 2008 -0700 1.3 @@ -1317,10 +1317,6 @@ 1.4 ThreadSafepointState::destroy(this); 1.5 if (_thread_profiler != NULL) delete _thread_profiler; 1.6 if (_thread_stat != NULL) delete _thread_stat; 1.7 - 1.8 - if (jvmti_thread_state() != NULL) { 1.9 - JvmtiExport::cleanup_thread(this); 1.10 - } 1.11 } 1.12 1.13 1.14 @@ -1571,6 +1567,10 @@ 1.15 tlab().make_parsable(true); // retire TLAB 1.16 } 1.17 1.18 + if (jvmti_thread_state() != NULL) { 1.19 + JvmtiExport::cleanup_thread(this); 1.20 + } 1.21 + 1.22 // Remove from list of active threads list, and notify VM thread if we are the last non-daemon thread 1.23 Threads::remove(this); 1.24 }