src/share/vm/prims/jvmtiExport.cpp

changeset 1044
ea20d7ce26b0
parent 777
37f87013dfd8
child 1316
16c930df1e9b
     1.1 --- a/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 02 13:57:17 2009 -0700
     1.2 +++ b/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 02 14:00:23 2009 -0700
     1.3 @@ -1872,6 +1872,9 @@
     1.4  {
     1.5    // register the stub with the current dynamic code event collector
     1.6    JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current());
     1.7 +  // state can only be NULL if the current thread is exiting which
     1.8 +  // should not happen since we're trying to post an event
     1.9 +  guarantee(state != NULL, "attempt to register stub via an exiting thread");
    1.10    JvmtiDynamicCodeEventCollector* collector = state->get_dynamic_code_event_collector();
    1.11    guarantee(collector != NULL, "attempt to register stub without event collector");
    1.12    collector->register_stub(name, code_begin, code_end);
    1.13 @@ -2253,6 +2256,9 @@
    1.14  void JvmtiEventCollector::setup_jvmti_thread_state() {
    1.15    // set this event collector to be the current one.
    1.16    JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current());
    1.17 +  // state can only be NULL if the current thread is exiting which
    1.18 +  // should not happen since we're trying to configure for event collection
    1.19 +  guarantee(state != NULL, "exiting thread called setup_jvmti_thread_state");
    1.20    if (is_vm_object_alloc_event()) {
    1.21      _prev = state->get_vm_object_alloc_event_collector();
    1.22      state->set_vm_object_alloc_event_collector((JvmtiVMObjectAllocEventCollector *)this);

mercurial