860 JvmtiEnv *env = ets->get_env();
861 JvmtiLocationEventMark jem(thread, mh, location);
862 JvmtiJavaThreadEventTransition jet(thread);
863 jvmtiEventBreakpoint callback = env->callbacks()->Breakpoint;
864 if (callback != NULL) {
865 (*callback)(env->jvmti_external(), jem.jni_env(), jem.jni_thread(),
866 jem.jni_methodID(), jem.location());
867 }
868
869 ets->set_breakpoint_posted();
870 thread->osthread()->set_state(old_os_state);
871 }
872 }
873 }
874
875 //////////////////////////////////////////////////////////////////////////////
876
877 bool JvmtiExport::_can_get_source_debug_extension = false;
878 bool JvmtiExport::_can_maintain_original_method_order = false;
879 bool JvmtiExport::_can_post_interpreter_events = false;
880 bool JvmtiExport::_can_post_exceptions = false;
881 bool JvmtiExport::_can_post_breakpoint = false;
882 bool JvmtiExport::_can_post_field_access = false;
883 bool JvmtiExport::_can_post_field_modification = false;
884 bool JvmtiExport::_can_post_method_entry = false;
885 bool JvmtiExport::_can_post_method_exit = false;
886 bool JvmtiExport::_can_pop_frame = false;
887 bool JvmtiExport::_can_force_early_return = false;
888
889 bool JvmtiExport::_should_post_single_step = false;
890 bool JvmtiExport::_should_post_field_access = false;
891 bool JvmtiExport::_should_post_field_modification = false;
892 bool JvmtiExport::_should_post_class_load = false;
893 bool JvmtiExport::_should_post_class_prepare = false;
894 bool JvmtiExport::_should_post_class_unload = false;
895 bool JvmtiExport::_should_post_thread_life = false;
896 bool JvmtiExport::_should_clean_up_heap_objects = false;
897 bool JvmtiExport::_should_post_native_method_bind = false;
898 bool JvmtiExport::_should_post_dynamic_code_generated = false;
899 bool JvmtiExport::_should_post_data_dump = false;
900 bool JvmtiExport::_should_post_compiled_method_load = false;
901 bool JvmtiExport::_should_post_compiled_method_unload = false;
902 bool JvmtiExport::_should_post_monitor_contended_enter = false;
903 bool JvmtiExport::_should_post_monitor_contended_entered = false;
904 bool JvmtiExport::_should_post_monitor_wait = false;
905 bool JvmtiExport::_should_post_monitor_waited = false;
906 bool JvmtiExport::_should_post_garbage_collection_start = false;
907 bool JvmtiExport::_should_post_garbage_collection_finish = false;
908 bool JvmtiExport::_should_post_object_free = false;
909 bool JvmtiExport::_should_post_resource_exhausted = false;
910 bool JvmtiExport::_should_post_vm_object_alloc = false;
911
912 ////////////////////////////////////////////////////////////////////////////////////////////////
913
914
915 //
916 // JVMTI single step management
917 //
918 void JvmtiExport::at_single_stepping_point(JavaThread *thread, methodOop method, address location) {
919 assert(JvmtiExport::should_post_single_step(), "must be single stepping");
920
921 HandleMark hm(thread);
922 methodHandle mh(thread, method);
923
924 // update information about current location and post a step event
925 JvmtiThreadState *state = thread->jvmti_thread_state();
926 if (state == NULL) {
927 return;
928 }
929 EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Trg Single Step triggered",
930 JvmtiTrace::safe_get_thread_name(thread)));
|
860 JvmtiEnv *env = ets->get_env();
861 JvmtiLocationEventMark jem(thread, mh, location);
862 JvmtiJavaThreadEventTransition jet(thread);
863 jvmtiEventBreakpoint callback = env->callbacks()->Breakpoint;
864 if (callback != NULL) {
865 (*callback)(env->jvmti_external(), jem.jni_env(), jem.jni_thread(),
866 jem.jni_methodID(), jem.location());
867 }
868
869 ets->set_breakpoint_posted();
870 thread->osthread()->set_state(old_os_state);
871 }
872 }
873 }
874
875 //////////////////////////////////////////////////////////////////////////////
876
877 bool JvmtiExport::_can_get_source_debug_extension = false;
878 bool JvmtiExport::_can_maintain_original_method_order = false;
879 bool JvmtiExport::_can_post_interpreter_events = false;
880 bool JvmtiExport::_can_post_on_exceptions = false;
881 bool JvmtiExport::_can_post_breakpoint = false;
882 bool JvmtiExport::_can_post_field_access = false;
883 bool JvmtiExport::_can_post_field_modification = false;
884 bool JvmtiExport::_can_post_method_entry = false;
885 bool JvmtiExport::_can_post_method_exit = false;
886 bool JvmtiExport::_can_pop_frame = false;
887 bool JvmtiExport::_can_force_early_return = false;
888
889 bool JvmtiExport::_should_post_single_step = false;
890 bool JvmtiExport::_should_post_field_access = false;
891 bool JvmtiExport::_should_post_field_modification = false;
892 bool JvmtiExport::_should_post_class_load = false;
893 bool JvmtiExport::_should_post_class_prepare = false;
894 bool JvmtiExport::_should_post_class_unload = false;
895 bool JvmtiExport::_should_post_thread_life = false;
896 bool JvmtiExport::_should_clean_up_heap_objects = false;
897 bool JvmtiExport::_should_post_native_method_bind = false;
898 bool JvmtiExport::_should_post_dynamic_code_generated = false;
899 bool JvmtiExport::_should_post_data_dump = false;
900 bool JvmtiExport::_should_post_compiled_method_load = false;
901 bool JvmtiExport::_should_post_compiled_method_unload = false;
902 bool JvmtiExport::_should_post_monitor_contended_enter = false;
903 bool JvmtiExport::_should_post_monitor_contended_entered = false;
904 bool JvmtiExport::_should_post_monitor_wait = false;
905 bool JvmtiExport::_should_post_monitor_waited = false;
906 bool JvmtiExport::_should_post_garbage_collection_start = false;
907 bool JvmtiExport::_should_post_garbage_collection_finish = false;
908 bool JvmtiExport::_should_post_object_free = false;
909 bool JvmtiExport::_should_post_resource_exhausted = false;
910 bool JvmtiExport::_should_post_vm_object_alloc = false;
911 bool JvmtiExport::_should_post_on_exceptions = false;
912
913 ////////////////////////////////////////////////////////////////////////////////////////////////
914
915
916 //
917 // JVMTI single step management
918 //
919 void JvmtiExport::at_single_stepping_point(JavaThread *thread, methodOop method, address location) {
920 assert(JvmtiExport::should_post_single_step(), "must be single stepping");
921
922 HandleMark hm(thread);
923 methodHandle mh(thread, method);
924
925 // update information about current location and post a step event
926 JvmtiThreadState *state = thread->jvmti_thread_state();
927 if (state == NULL) {
928 return;
929 }
930 EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Trg Single Step triggered",
931 JvmtiTrace::safe_get_thread_name(thread)));
|