equal
deleted
inserted
replaced
1870 void JvmtiExport::post_dynamic_code_generated_while_holding_locks(const char* name, |
1870 void JvmtiExport::post_dynamic_code_generated_while_holding_locks(const char* name, |
1871 address code_begin, address code_end) |
1871 address code_begin, address code_end) |
1872 { |
1872 { |
1873 // register the stub with the current dynamic code event collector |
1873 // register the stub with the current dynamic code event collector |
1874 JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current()); |
1874 JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current()); |
|
1875 // state can only be NULL if the current thread is exiting which |
|
1876 // should not happen since we're trying to post an event |
|
1877 guarantee(state != NULL, "attempt to register stub via an exiting thread"); |
1875 JvmtiDynamicCodeEventCollector* collector = state->get_dynamic_code_event_collector(); |
1878 JvmtiDynamicCodeEventCollector* collector = state->get_dynamic_code_event_collector(); |
1876 guarantee(collector != NULL, "attempt to register stub without event collector"); |
1879 guarantee(collector != NULL, "attempt to register stub without event collector"); |
1877 collector->register_stub(name, code_begin, code_end); |
1880 collector->register_stub(name, code_begin, code_end); |
1878 } |
1881 } |
1879 |
1882 |
2251 |
2254 |
2252 // Setup current current thread for event collection. |
2255 // Setup current current thread for event collection. |
2253 void JvmtiEventCollector::setup_jvmti_thread_state() { |
2256 void JvmtiEventCollector::setup_jvmti_thread_state() { |
2254 // set this event collector to be the current one. |
2257 // set this event collector to be the current one. |
2255 JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current()); |
2258 JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current()); |
|
2259 // state can only be NULL if the current thread is exiting which |
|
2260 // should not happen since we're trying to configure for event collection |
|
2261 guarantee(state != NULL, "exiting thread called setup_jvmti_thread_state"); |
2256 if (is_vm_object_alloc_event()) { |
2262 if (is_vm_object_alloc_event()) { |
2257 _prev = state->get_vm_object_alloc_event_collector(); |
2263 _prev = state->get_vm_object_alloc_event_collector(); |
2258 state->set_vm_object_alloc_event_collector((JvmtiVMObjectAllocEventCollector *)this); |
2264 state->set_vm_object_alloc_event_collector((JvmtiVMObjectAllocEventCollector *)this); |
2259 } else if (is_dynamic_code_event()) { |
2265 } else if (is_dynamic_code_event()) { |
2260 _prev = state->get_dynamic_code_event_collector(); |
2266 _prev = state->get_dynamic_code_event_collector(); |