hotspot/src/share/vm/runtime/thread.cpp
changeset 222 3d1795325749
parent 1 489c9b5090e2
child 225 6258c2e3adfd
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Mar 12 18:07:46 2008 -0700
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Wed Mar 12 18:09:34 2008 -0700
@@ -1317,10 +1317,6 @@
   ThreadSafepointState::destroy(this);
   if (_thread_profiler != NULL) delete _thread_profiler;
   if (_thread_stat != NULL) delete _thread_stat;
-
-  if (jvmti_thread_state() != NULL) {
-    JvmtiExport::cleanup_thread(this);
-  }
 }
 
 
@@ -1571,6 +1567,10 @@
     tlab().make_parsable(true);  // retire TLAB
   }
 
+  if (jvmti_thread_state() != NULL) {
+    JvmtiExport::cleanup_thread(this);
+  }
+
   // Remove from list of active threads list, and notify VM thread if we are the last non-daemon thread
   Threads::remove(this);
 }