diff src/share/vm/runtime/thread.cpp @ 2126:db2b0f8c1cef

6814943: getcpool001 catches more than one JvmtiThreadState problem Summary: Mark field volatile, use membars, and change access order to close race Reviewed-by: dcubed, dholmes
author kamg
date Tue, 11 Jan 2011 10:06:00 -0500
parents b1a2afa37ec4
children 8f8dfba37802
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp	Mon Jan 10 17:14:53 2011 -0500
+++ b/src/share/vm/runtime/thread.cpp	Tue Jan 11 10:06:00 2011 -0500
@@ -31,6 +31,7 @@
 #include "compiler/compileBroker.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/linkResolver.hpp"
+#include "jvmtifiles/jvmtiEnv.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/instanceKlass.hpp"
@@ -1699,7 +1700,7 @@
     tlab().make_parsable(true);  // retire TLAB
   }
 
-  if (jvmti_thread_state() != NULL) {
+  if (JvmtiEnv::environments_might_exist()) {
     JvmtiExport::cleanup_thread(this);
   }