302 bool JvmtiExport::_can_access_local_variables = false; |
302 bool JvmtiExport::_can_access_local_variables = false; |
303 bool JvmtiExport::_can_hotswap_or_post_breakpoint = false; |
303 bool JvmtiExport::_can_hotswap_or_post_breakpoint = false; |
304 bool JvmtiExport::_can_modify_any_class = false; |
304 bool JvmtiExport::_can_modify_any_class = false; |
305 bool JvmtiExport::_can_walk_any_space = false; |
305 bool JvmtiExport::_can_walk_any_space = false; |
306 |
306 |
307 bool JvmtiExport::_has_redefined_a_class = false; |
307 uint64_t JvmtiExport::_redefinition_count = 0; |
308 bool JvmtiExport::_all_dependencies_are_recorded = false; |
308 bool JvmtiExport::_all_dependencies_are_recorded = false; |
309 |
309 |
310 // |
310 // |
311 // field access management |
311 // field access management |
312 // |
312 // |
1200 bool JvmtiExport::_can_post_field_modification = false; |
1200 bool JvmtiExport::_can_post_field_modification = false; |
1201 bool JvmtiExport::_can_post_method_entry = false; |
1201 bool JvmtiExport::_can_post_method_entry = false; |
1202 bool JvmtiExport::_can_post_method_exit = false; |
1202 bool JvmtiExport::_can_post_method_exit = false; |
1203 bool JvmtiExport::_can_pop_frame = false; |
1203 bool JvmtiExport::_can_pop_frame = false; |
1204 bool JvmtiExport::_can_force_early_return = false; |
1204 bool JvmtiExport::_can_force_early_return = false; |
|
1205 bool JvmtiExport::_can_get_owned_monitor_info = false; |
1205 |
1206 |
1206 bool JvmtiExport::_early_vmstart_recorded = false; |
1207 bool JvmtiExport::_early_vmstart_recorded = false; |
1207 |
1208 |
1208 bool JvmtiExport::_should_post_single_step = false; |
1209 bool JvmtiExport::_should_post_single_step = false; |
1209 bool JvmtiExport::_should_post_field_access = false; |
1210 bool JvmtiExport::_should_post_field_access = false; |
1587 // the address of a "raw result" and we just call into the interpreter to |
1588 // the address of a "raw result" and we just call into the interpreter to |
1588 // convert this into a jvalue. |
1589 // convert this into a jvalue. |
1589 if (!exception_exit) { |
1590 if (!exception_exit) { |
1590 oop oop_result; |
1591 oop oop_result; |
1591 BasicType type = current_frame.interpreter_frame_result(&oop_result, &value); |
1592 BasicType type = current_frame.interpreter_frame_result(&oop_result, &value); |
1592 if (type == T_OBJECT || type == T_ARRAY) { |
1593 if (is_reference_type(type)) { |
1593 result = Handle(thread, oop_result); |
1594 result = Handle(thread, oop_result); |
1594 } |
1595 } |
1595 } |
1596 } |
1596 |
1597 |
1597 JvmtiEnvThreadStateIterator it(state); |
1598 JvmtiEnvThreadStateIterator it(state); |
2277 // post a DynamicCodeGenerated event while holding locks in the VM. |
2278 // post a DynamicCodeGenerated event while holding locks in the VM. |
2278 void JvmtiExport::post_dynamic_code_generated_while_holding_locks(const char* name, |
2279 void JvmtiExport::post_dynamic_code_generated_while_holding_locks(const char* name, |
2279 address code_begin, address code_end) |
2280 address code_begin, address code_end) |
2280 { |
2281 { |
2281 // register the stub with the current dynamic code event collector |
2282 // register the stub with the current dynamic code event collector |
2282 JvmtiThreadState* state = JvmtiThreadState::state_for(JavaThread::current()); |
2283 // Cannot take safepoint here so do not use state_for to get |
|
2284 // jvmti thread state. |
|
2285 JvmtiThreadState* state = JavaThread::current()->jvmti_thread_state(); |
2283 // state can only be NULL if the current thread is exiting which |
2286 // state can only be NULL if the current thread is exiting which |
2284 // should not happen since we're trying to post an event |
2287 // should not happen since we're trying to post an event |
2285 guarantee(state != NULL, "attempt to register stub via an exiting thread"); |
2288 guarantee(state != NULL, "attempt to register stub via an exiting thread"); |
2286 JvmtiDynamicCodeEventCollector* collector = state->get_dynamic_code_event_collector(); |
2289 JvmtiDynamicCodeEventCollector* collector = state->get_dynamic_code_event_collector(); |
2287 guarantee(collector != NULL, "attempt to register stub without event collector"); |
2290 guarantee(collector != NULL, "attempt to register stub without event collector"); |
2292 void JvmtiExport::record_vm_internal_object_allocation(oop obj) { |
2295 void JvmtiExport::record_vm_internal_object_allocation(oop obj) { |
2293 Thread* thread = Thread::current_or_null(); |
2296 Thread* thread = Thread::current_or_null(); |
2294 if (thread != NULL && thread->is_Java_thread()) { |
2297 if (thread != NULL && thread->is_Java_thread()) { |
2295 // Can not take safepoint here. |
2298 // Can not take safepoint here. |
2296 NoSafepointVerifier no_sfpt; |
2299 NoSafepointVerifier no_sfpt; |
2297 // Can not take safepoint here so can not use state_for to get |
2300 // Cannot take safepoint here so do not use state_for to get |
2298 // jvmti thread state. |
2301 // jvmti thread state. |
2299 JvmtiThreadState *state = ((JavaThread*)thread)->jvmti_thread_state(); |
2302 JvmtiThreadState *state = ((JavaThread*)thread)->jvmti_thread_state(); |
2300 if (state != NULL) { |
2303 if (state != NULL) { |
2301 // state is non NULL when VMObjectAllocEventCollector is enabled. |
2304 // state is non NULL when VMObjectAllocEventCollector is enabled. |
2302 JvmtiVMObjectAllocEventCollector *collector; |
2305 JvmtiVMObjectAllocEventCollector *collector; |
2316 void JvmtiExport::record_sampled_internal_object_allocation(oop obj) { |
2319 void JvmtiExport::record_sampled_internal_object_allocation(oop obj) { |
2317 Thread* thread = Thread::current_or_null(); |
2320 Thread* thread = Thread::current_or_null(); |
2318 if (thread != NULL && thread->is_Java_thread()) { |
2321 if (thread != NULL && thread->is_Java_thread()) { |
2319 // Can not take safepoint here. |
2322 // Can not take safepoint here. |
2320 NoSafepointVerifier no_sfpt; |
2323 NoSafepointVerifier no_sfpt; |
2321 // Can not take safepoint here so can not use state_for to get |
2324 // Cannot take safepoint here so do not use state_for to get |
2322 // jvmti thread state. |
2325 // jvmti thread state. |
2323 JvmtiThreadState *state = ((JavaThread*)thread)->jvmti_thread_state(); |
2326 JvmtiThreadState *state = ((JavaThread*)thread)->jvmti_thread_state(); |
2324 if (state != NULL) { |
2327 if (state != NULL) { |
2325 // state is non NULL when SampledObjectAllocEventCollector is enabled. |
2328 // state is non NULL when SampledObjectAllocEventCollector is enabled. |
2326 JvmtiSampledObjectAllocEventCollector *collector; |
2329 JvmtiSampledObjectAllocEventCollector *collector; |
2613 |
2616 |
2614 void JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) { |
2617 void JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) { |
2615 JvmtiTagMap::weak_oops_do(is_alive, f); |
2618 JvmtiTagMap::weak_oops_do(is_alive, f); |
2616 } |
2619 } |
2617 |
2620 |
2618 void JvmtiExport::gc_epilogue() { |
|
2619 JvmtiCurrentBreakpoints::gc_epilogue(); |
|
2620 } |
|
2621 |
|
2622 // Onload raw monitor transition. |
2621 // Onload raw monitor transition. |
2623 void JvmtiExport::transition_pending_onload_raw_monitors() { |
2622 void JvmtiExport::transition_pending_onload_raw_monitors() { |
2624 JvmtiPendingMonitors::transition_raw_monitors(); |
2623 JvmtiPendingMonitors::transition_raw_monitors(); |
2625 } |
2624 } |
2626 |
2625 |