--- a/hotspot/src/share/vm/runtime/thread.hpp Mon Mar 02 13:57:17 2009 -0700
+++ b/hotspot/src/share/vm/runtime/thread.hpp Mon Mar 02 14:00:23 2009 -0700
@@ -1345,6 +1345,13 @@
public:
// Thread local information maintained by JVMTI.
void set_jvmti_thread_state(JvmtiThreadState *value) { _jvmti_thread_state = value; }
+ // A JvmtiThreadState is lazily allocated. This jvmti_thread_state()
+ // getter is used to get this JavaThread's JvmtiThreadState if it has
+ // one which means NULL can be returned. JvmtiThreadState::state_for()
+ // is used to get the specified JavaThread's JvmtiThreadState if it has
+ // one or it allocates a new JvmtiThreadState for the JavaThread and
+ // returns it. JvmtiThreadState::state_for() will return NULL only if
+ // the specified JavaThread is exiting.
JvmtiThreadState *jvmti_thread_state() const { return _jvmti_thread_state; }
static ByteSize jvmti_thread_state_offset() { return byte_offset_of(JavaThread, _jvmti_thread_state); }
void set_jvmti_get_loaded_classes_closure(JvmtiGetLoadedClassesClosure* value) { _jvmti_get_loaded_classes_closure = value; }