< prev index next >

src/hotspot/share/prims/jvmtiEventController.cpp

Print this page




  68 static const jlong  CLASS_LOAD_BIT = (((jlong)1) << (JVMTI_EVENT_CLASS_LOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  69 static const jlong  CLASS_PREPARE_BIT = (((jlong)1) << (JVMTI_EVENT_CLASS_PREPARE - TOTAL_MIN_EVENT_TYPE_VAL));
  70 static const jlong  THREAD_START_BIT = (((jlong)1) << (JVMTI_EVENT_THREAD_START - TOTAL_MIN_EVENT_TYPE_VAL));
  71 static const jlong  THREAD_END_BIT = (((jlong)1) << (JVMTI_EVENT_THREAD_END - TOTAL_MIN_EVENT_TYPE_VAL));
  72 static const jlong  EXCEPTION_THROW_BIT = (((jlong)1) << (JVMTI_EVENT_EXCEPTION - TOTAL_MIN_EVENT_TYPE_VAL));
  73 static const jlong  EXCEPTION_CATCH_BIT = (((jlong)1) << (JVMTI_EVENT_EXCEPTION_CATCH - TOTAL_MIN_EVENT_TYPE_VAL));
  74 static const jlong  MONITOR_CONTENDED_ENTER_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_CONTENDED_ENTER - TOTAL_MIN_EVENT_TYPE_VAL));
  75 static const jlong  MONITOR_CONTENDED_ENTERED_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_CONTENDED_ENTERED - TOTAL_MIN_EVENT_TYPE_VAL));
  76 static const jlong  MONITOR_WAIT_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_WAIT - TOTAL_MIN_EVENT_TYPE_VAL));
  77 static const jlong  MONITOR_WAITED_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_WAITED - TOTAL_MIN_EVENT_TYPE_VAL));
  78 static const jlong  DYNAMIC_CODE_GENERATED_BIT = (((jlong)1) << (JVMTI_EVENT_DYNAMIC_CODE_GENERATED - TOTAL_MIN_EVENT_TYPE_VAL));
  79 static const jlong  DATA_DUMP_BIT = (((jlong)1) << (JVMTI_EVENT_DATA_DUMP_REQUEST - TOTAL_MIN_EVENT_TYPE_VAL));
  80 static const jlong  COMPILED_METHOD_LOAD_BIT = (((jlong)1) << (JVMTI_EVENT_COMPILED_METHOD_LOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  81 static const jlong  COMPILED_METHOD_UNLOAD_BIT = (((jlong)1) << (JVMTI_EVENT_COMPILED_METHOD_UNLOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  82 static const jlong  GARBAGE_COLLECTION_START_BIT = (((jlong)1) << (JVMTI_EVENT_GARBAGE_COLLECTION_START - TOTAL_MIN_EVENT_TYPE_VAL));
  83 static const jlong  GARBAGE_COLLECTION_FINISH_BIT = (((jlong)1) << (JVMTI_EVENT_GARBAGE_COLLECTION_FINISH - TOTAL_MIN_EVENT_TYPE_VAL));
  84 static const jlong  OBJECT_FREE_BIT = (((jlong)1) << (JVMTI_EVENT_OBJECT_FREE - TOTAL_MIN_EVENT_TYPE_VAL));
  85 static const jlong  RESOURCE_EXHAUSTED_BIT = (((jlong)1) << (JVMTI_EVENT_RESOURCE_EXHAUSTED - TOTAL_MIN_EVENT_TYPE_VAL));
  86 static const jlong  VM_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_VM_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));
  87 static const jlong  SAMPLED_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_SAMPLED_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));






  88 
  89 // bits for extension events
  90 static const jlong  CLASS_UNLOAD_BIT = (((jlong)1) << (EXT_EVENT_CLASS_UNLOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  91 
  92 


  93 static const jlong  MONITOR_BITS = MONITOR_CONTENDED_ENTER_BIT | MONITOR_CONTENDED_ENTERED_BIT |
  94                           MONITOR_WAIT_BIT | MONITOR_WAITED_BIT;
  95 static const jlong  EXCEPTION_BITS = EXCEPTION_THROW_BIT | EXCEPTION_CATCH_BIT;
  96 static const jlong  INTERP_EVENT_BITS =  SINGLE_STEP_BIT | METHOD_ENTRY_BIT | METHOD_EXIT_BIT |
  97                                 FRAME_POP_BIT | FIELD_ACCESS_BIT | FIELD_MODIFICATION_BIT;
  98 static const jlong  THREAD_FILTERED_EVENT_BITS = INTERP_EVENT_BITS | EXCEPTION_BITS | MONITOR_BITS |
  99                                         BREAKPOINT_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT | THREAD_END_BIT |
 100                                         SAMPLED_OBJECT_ALLOC_BIT;
 101 static const jlong  NEED_THREAD_LIFE_EVENTS = THREAD_FILTERED_EVENT_BITS | THREAD_START_BIT;
 102 static const jlong  EARLY_EVENT_BITS = CLASS_FILE_LOAD_HOOK_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT |
 103                                VM_START_BIT | VM_INIT_BIT | VM_DEATH_BIT | NATIVE_METHOD_BIND_BIT |
 104                                THREAD_START_BIT | THREAD_END_BIT |
 105                                COMPILED_METHOD_LOAD_BIT | COMPILED_METHOD_UNLOAD_BIT |
 106                                DYNAMIC_CODE_GENERATED_BIT;
 107 static const jlong  GLOBAL_EVENT_BITS = ~THREAD_FILTERED_EVENT_BITS;
 108 static const jlong  SHOULD_POST_ON_EXCEPTIONS_BITS = EXCEPTION_BITS | METHOD_EXIT_BIT | FRAME_POP_BIT;
 109 
 110 ///////////////////////////////////////////////////////////////
 111 //
 112 // JvmtiEventEnabled
 113 //
 114 
 115 JvmtiEventEnabled::JvmtiEventEnabled() {
 116   clear();
 117 }
 118 


 199 public:
 200   VM_EnterInterpOnlyMode(JvmtiThreadState *state);
 201 
 202   bool allow_nested_vm_operations() const        { return true; }
 203   VMOp_Type type() const { return VMOp_EnterInterpOnlyMode; }
 204   void doit();
 205 
 206   // to do: this same function is in jvmtiImpl - should be in one place
 207   bool can_be_deoptimized(vframe* vf) {
 208     return (vf->is_compiled_frame() && vf->fr().can_be_deoptimized());
 209   }
 210 };
 211 
 212 VM_EnterInterpOnlyMode::VM_EnterInterpOnlyMode(JvmtiThreadState *state)
 213   : _state(state)
 214 {
 215 }
 216 
 217 
 218 void VM_EnterInterpOnlyMode::doit() {
 219   // Set up the current stack depth for later tracking
 220   _state->invalidate_cur_stack_depth();
 221 
 222   _state->enter_interp_only_mode();
 223 
 224   JavaThread *thread = _state->get_thread();
 225   if (thread->has_last_Java_frame()) {
 226     // If running in fullspeed mode, single stepping is implemented
 227     // as follows: first, the interpreter does not dispatch to
 228     // compiled code for threads that have single stepping enabled;
 229     // second, we deoptimize all methods on the thread's stack when
 230     // interpreted-only mode is enabled the first time for a given
 231     // thread (nothing to do if no Java frames yet).
 232     int num_marked = 0;
 233     ResourceMark resMark;
 234     RegisterMap rm(thread, false);
 235     for (vframe* vf = thread->last_java_vframe(&rm); vf; vf = vf->sender()) {
 236       if (can_be_deoptimized(vf)) {
 237         ((compiledVFrame*) vf)->code()->mark_for_deoptimization();
 238         ++num_marked;
 239       }
 240     }
 241     if (num_marked > 0) {
 242       VM_Deoptimize op;
 243       VMThread::execute(&op);
 244     }
 245   }
 246 }
 247 
 248 
 249 ///////////////////////////////////////////////////////////////
 250 //
 251 // VM_ChangeSingleStep
 252 //
 253 
 254 class VM_ChangeSingleStep : public VM_Operation {


 608     JvmtiExport::set_should_post_field_modification((any_env_thread_enabled & FIELD_MODIFICATION_BIT) != 0);
 609     JvmtiExport::set_should_post_class_load((any_env_thread_enabled & CLASS_LOAD_BIT) != 0);
 610     JvmtiExport::set_should_post_class_file_load_hook((any_env_thread_enabled & CLASS_FILE_LOAD_HOOK_BIT) != 0);
 611     JvmtiExport::set_should_post_native_method_bind((any_env_thread_enabled & NATIVE_METHOD_BIND_BIT) != 0);
 612     JvmtiExport::set_should_post_dynamic_code_generated((any_env_thread_enabled & DYNAMIC_CODE_GENERATED_BIT) != 0);
 613     JvmtiExport::set_should_post_data_dump((any_env_thread_enabled & DATA_DUMP_BIT) != 0);
 614     JvmtiExport::set_should_post_class_prepare((any_env_thread_enabled & CLASS_PREPARE_BIT) != 0);
 615     JvmtiExport::set_should_post_class_unload((any_env_thread_enabled & CLASS_UNLOAD_BIT) != 0);
 616     JvmtiExport::set_should_post_monitor_contended_enter((any_env_thread_enabled & MONITOR_CONTENDED_ENTER_BIT) != 0);
 617     JvmtiExport::set_should_post_monitor_contended_entered((any_env_thread_enabled & MONITOR_CONTENDED_ENTERED_BIT) != 0);
 618     JvmtiExport::set_should_post_monitor_wait((any_env_thread_enabled & MONITOR_WAIT_BIT) != 0);
 619     JvmtiExport::set_should_post_monitor_waited((any_env_thread_enabled & MONITOR_WAITED_BIT) != 0);
 620     JvmtiExport::set_should_post_garbage_collection_start((any_env_thread_enabled & GARBAGE_COLLECTION_START_BIT) != 0);
 621     JvmtiExport::set_should_post_garbage_collection_finish((any_env_thread_enabled & GARBAGE_COLLECTION_FINISH_BIT) != 0);
 622     JvmtiExport::set_should_post_object_free((any_env_thread_enabled & OBJECT_FREE_BIT) != 0);
 623     JvmtiExport::set_should_post_resource_exhausted((any_env_thread_enabled & RESOURCE_EXHAUSTED_BIT) != 0);
 624     JvmtiExport::set_should_post_compiled_method_load((any_env_thread_enabled & COMPILED_METHOD_LOAD_BIT) != 0);
 625     JvmtiExport::set_should_post_compiled_method_unload((any_env_thread_enabled & COMPILED_METHOD_UNLOAD_BIT) != 0);
 626     JvmtiExport::set_should_post_vm_object_alloc((any_env_thread_enabled & VM_OBJECT_ALLOC_BIT) != 0);
 627     JvmtiExport::set_should_post_sampled_object_alloc((any_env_thread_enabled & SAMPLED_OBJECT_ALLOC_BIT) != 0);






 628 
 629     // need this if we want thread events or we need them to init data
 630     JvmtiExport::set_should_post_thread_life((any_env_thread_enabled & NEED_THREAD_LIFE_EVENTS) != 0);
 631 
 632     // If single stepping is turned on or off, execute the VM op to change it.
 633     if (delta & SINGLE_STEP_BIT) {
 634       switch (JvmtiEnv::get_phase()) {
 635       case JVMTI_PHASE_DEAD:
 636         // If the VM is dying we can't execute VM ops
 637         break;
 638       case JVMTI_PHASE_LIVE: {
 639         VM_ChangeSingleStep op((any_env_thread_enabled & SINGLE_STEP_BIT) != 0);
 640         VMThread::execute(&op);
 641         break;
 642       }
 643       default:
 644         assert(false, "should never come here before live phase");
 645         break;
 646       }
 647     }




  68 static const jlong  CLASS_LOAD_BIT = (((jlong)1) << (JVMTI_EVENT_CLASS_LOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  69 static const jlong  CLASS_PREPARE_BIT = (((jlong)1) << (JVMTI_EVENT_CLASS_PREPARE - TOTAL_MIN_EVENT_TYPE_VAL));
  70 static const jlong  THREAD_START_BIT = (((jlong)1) << (JVMTI_EVENT_THREAD_START - TOTAL_MIN_EVENT_TYPE_VAL));
  71 static const jlong  THREAD_END_BIT = (((jlong)1) << (JVMTI_EVENT_THREAD_END - TOTAL_MIN_EVENT_TYPE_VAL));
  72 static const jlong  EXCEPTION_THROW_BIT = (((jlong)1) << (JVMTI_EVENT_EXCEPTION - TOTAL_MIN_EVENT_TYPE_VAL));
  73 static const jlong  EXCEPTION_CATCH_BIT = (((jlong)1) << (JVMTI_EVENT_EXCEPTION_CATCH - TOTAL_MIN_EVENT_TYPE_VAL));
  74 static const jlong  MONITOR_CONTENDED_ENTER_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_CONTENDED_ENTER - TOTAL_MIN_EVENT_TYPE_VAL));
  75 static const jlong  MONITOR_CONTENDED_ENTERED_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_CONTENDED_ENTERED - TOTAL_MIN_EVENT_TYPE_VAL));
  76 static const jlong  MONITOR_WAIT_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_WAIT - TOTAL_MIN_EVENT_TYPE_VAL));
  77 static const jlong  MONITOR_WAITED_BIT = (((jlong)1) << (JVMTI_EVENT_MONITOR_WAITED - TOTAL_MIN_EVENT_TYPE_VAL));
  78 static const jlong  DYNAMIC_CODE_GENERATED_BIT = (((jlong)1) << (JVMTI_EVENT_DYNAMIC_CODE_GENERATED - TOTAL_MIN_EVENT_TYPE_VAL));
  79 static const jlong  DATA_DUMP_BIT = (((jlong)1) << (JVMTI_EVENT_DATA_DUMP_REQUEST - TOTAL_MIN_EVENT_TYPE_VAL));
  80 static const jlong  COMPILED_METHOD_LOAD_BIT = (((jlong)1) << (JVMTI_EVENT_COMPILED_METHOD_LOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  81 static const jlong  COMPILED_METHOD_UNLOAD_BIT = (((jlong)1) << (JVMTI_EVENT_COMPILED_METHOD_UNLOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  82 static const jlong  GARBAGE_COLLECTION_START_BIT = (((jlong)1) << (JVMTI_EVENT_GARBAGE_COLLECTION_START - TOTAL_MIN_EVENT_TYPE_VAL));
  83 static const jlong  GARBAGE_COLLECTION_FINISH_BIT = (((jlong)1) << (JVMTI_EVENT_GARBAGE_COLLECTION_FINISH - TOTAL_MIN_EVENT_TYPE_VAL));
  84 static const jlong  OBJECT_FREE_BIT = (((jlong)1) << (JVMTI_EVENT_OBJECT_FREE - TOTAL_MIN_EVENT_TYPE_VAL));
  85 static const jlong  RESOURCE_EXHAUSTED_BIT = (((jlong)1) << (JVMTI_EVENT_RESOURCE_EXHAUSTED - TOTAL_MIN_EVENT_TYPE_VAL));
  86 static const jlong  VM_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_VM_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));
  87 static const jlong  SAMPLED_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_SAMPLED_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));
  88 static const jlong  FIBER_SCHEDULED_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_SCHEDULED - TOTAL_MIN_EVENT_TYPE_VAL));
  89 static const jlong  FIBER_TERMINATED_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_TERMINATED - TOTAL_MIN_EVENT_TYPE_VAL));
  90 static const jlong  FIBER_MOUNT_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_MOUNT - TOTAL_MIN_EVENT_TYPE_VAL));
  91 static const jlong  FIBER_UNMOUNT_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_UNMOUNT - TOTAL_MIN_EVENT_TYPE_VAL));
  92 static const jlong  CONTINUATION_RUN_BIT = (((jlong)1) << (JVMTI_EVENT_CONTINUATION_RUN - TOTAL_MIN_EVENT_TYPE_VAL));
  93 static const jlong  CONTINUATION_YIELD_BIT = (((jlong)1) << (JVMTI_EVENT_CONTINUATION_YIELD - TOTAL_MIN_EVENT_TYPE_VAL));
  94 
  95 // bits for extension events
  96 static const jlong  CLASS_UNLOAD_BIT = (((jlong)1) << (EXT_EVENT_CLASS_UNLOAD - TOTAL_MIN_EVENT_TYPE_VAL));
  97 
  98 
  99 static const jlong  FIBER_BITS = FIBER_SCHEDULED_BIT | FIBER_TERMINATED_BIT | FIBER_MOUNT_BIT | FIBER_UNMOUNT_BIT;
 100 static const jlong  CONTINUATION_BITS = CONTINUATION_RUN_BIT | CONTINUATION_YIELD_BIT;
 101 static const jlong  MONITOR_BITS = MONITOR_CONTENDED_ENTER_BIT | MONITOR_CONTENDED_ENTERED_BIT |
 102                           MONITOR_WAIT_BIT | MONITOR_WAITED_BIT;
 103 static const jlong  EXCEPTION_BITS = EXCEPTION_THROW_BIT | EXCEPTION_CATCH_BIT;
 104 static const jlong  INTERP_EVENT_BITS =  SINGLE_STEP_BIT | METHOD_ENTRY_BIT | METHOD_EXIT_BIT |
 105                                 FRAME_POP_BIT | FIELD_ACCESS_BIT | FIELD_MODIFICATION_BIT;
 106 static const jlong  THREAD_FILTERED_EVENT_BITS = INTERP_EVENT_BITS | EXCEPTION_BITS | MONITOR_BITS | FIBER_BITS | CONTINUATION_BITS |
 107                                         BREAKPOINT_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT | THREAD_END_BIT |
 108                                         SAMPLED_OBJECT_ALLOC_BIT;
 109 static const jlong  NEED_THREAD_LIFE_EVENTS = THREAD_FILTERED_EVENT_BITS | THREAD_START_BIT;
 110 static const jlong  EARLY_EVENT_BITS = CLASS_FILE_LOAD_HOOK_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT |
 111                                VM_START_BIT | VM_INIT_BIT | VM_DEATH_BIT | NATIVE_METHOD_BIND_BIT |
 112                                THREAD_START_BIT | THREAD_END_BIT |
 113                                COMPILED_METHOD_LOAD_BIT | COMPILED_METHOD_UNLOAD_BIT |
 114                                DYNAMIC_CODE_GENERATED_BIT;
 115 static const jlong  GLOBAL_EVENT_BITS = ~THREAD_FILTERED_EVENT_BITS;
 116 static const jlong  SHOULD_POST_ON_EXCEPTIONS_BITS = EXCEPTION_BITS | METHOD_EXIT_BIT | FRAME_POP_BIT;
 117 
 118 ///////////////////////////////////////////////////////////////
 119 //
 120 // JvmtiEventEnabled
 121 //
 122 
 123 JvmtiEventEnabled::JvmtiEventEnabled() {
 124   clear();
 125 }
 126 


 207 public:
 208   VM_EnterInterpOnlyMode(JvmtiThreadState *state);
 209 
 210   bool allow_nested_vm_operations() const        { return true; }
 211   VMOp_Type type() const { return VMOp_EnterInterpOnlyMode; }
 212   void doit();
 213 
 214   // to do: this same function is in jvmtiImpl - should be in one place
 215   bool can_be_deoptimized(vframe* vf) {
 216     return (vf->is_compiled_frame() && vf->fr().can_be_deoptimized());
 217   }
 218 };
 219 
 220 VM_EnterInterpOnlyMode::VM_EnterInterpOnlyMode(JvmtiThreadState *state)
 221   : _state(state)
 222 {
 223 }
 224 
 225 
 226 void VM_EnterInterpOnlyMode::doit() {



 227   _state->enter_interp_only_mode();
 228 
 229   JavaThread *thread = _state->get_thread();
 230   if (thread->has_last_Java_frame()) {
 231     // If running in fullspeed mode, single stepping is implemented
 232     // as follows: first, the interpreter does not dispatch to
 233     // compiled code for threads that have single stepping enabled;
 234     // second, we deoptimize all methods on the thread's stack when
 235     // interpreted-only mode is enabled the first time for a given
 236     // thread (nothing to do if no Java frames yet).
 237     int num_marked = 0;
 238     ResourceMark resMark;
 239     RegisterMap rm(thread, false, true);
 240     for (vframe* vf = thread->last_java_vframe(&rm); vf; vf = vf->sender()) {
 241       if (can_be_deoptimized(vf)) {
 242         ((compiledVFrame*) vf)->code()->mark_for_deoptimization();
 243         ++num_marked;
 244       }
 245     }
 246     if (num_marked > 0) {
 247       VM_Deoptimize op;
 248       VMThread::execute(&op);
 249     }
 250   }
 251 }
 252 
 253 
 254 ///////////////////////////////////////////////////////////////
 255 //
 256 // VM_ChangeSingleStep
 257 //
 258 
 259 class VM_ChangeSingleStep : public VM_Operation {


 613     JvmtiExport::set_should_post_field_modification((any_env_thread_enabled & FIELD_MODIFICATION_BIT) != 0);
 614     JvmtiExport::set_should_post_class_load((any_env_thread_enabled & CLASS_LOAD_BIT) != 0);
 615     JvmtiExport::set_should_post_class_file_load_hook((any_env_thread_enabled & CLASS_FILE_LOAD_HOOK_BIT) != 0);
 616     JvmtiExport::set_should_post_native_method_bind((any_env_thread_enabled & NATIVE_METHOD_BIND_BIT) != 0);
 617     JvmtiExport::set_should_post_dynamic_code_generated((any_env_thread_enabled & DYNAMIC_CODE_GENERATED_BIT) != 0);
 618     JvmtiExport::set_should_post_data_dump((any_env_thread_enabled & DATA_DUMP_BIT) != 0);
 619     JvmtiExport::set_should_post_class_prepare((any_env_thread_enabled & CLASS_PREPARE_BIT) != 0);
 620     JvmtiExport::set_should_post_class_unload((any_env_thread_enabled & CLASS_UNLOAD_BIT) != 0);
 621     JvmtiExport::set_should_post_monitor_contended_enter((any_env_thread_enabled & MONITOR_CONTENDED_ENTER_BIT) != 0);
 622     JvmtiExport::set_should_post_monitor_contended_entered((any_env_thread_enabled & MONITOR_CONTENDED_ENTERED_BIT) != 0);
 623     JvmtiExport::set_should_post_monitor_wait((any_env_thread_enabled & MONITOR_WAIT_BIT) != 0);
 624     JvmtiExport::set_should_post_monitor_waited((any_env_thread_enabled & MONITOR_WAITED_BIT) != 0);
 625     JvmtiExport::set_should_post_garbage_collection_start((any_env_thread_enabled & GARBAGE_COLLECTION_START_BIT) != 0);
 626     JvmtiExport::set_should_post_garbage_collection_finish((any_env_thread_enabled & GARBAGE_COLLECTION_FINISH_BIT) != 0);
 627     JvmtiExport::set_should_post_object_free((any_env_thread_enabled & OBJECT_FREE_BIT) != 0);
 628     JvmtiExport::set_should_post_resource_exhausted((any_env_thread_enabled & RESOURCE_EXHAUSTED_BIT) != 0);
 629     JvmtiExport::set_should_post_compiled_method_load((any_env_thread_enabled & COMPILED_METHOD_LOAD_BIT) != 0);
 630     JvmtiExport::set_should_post_compiled_method_unload((any_env_thread_enabled & COMPILED_METHOD_UNLOAD_BIT) != 0);
 631     JvmtiExport::set_should_post_vm_object_alloc((any_env_thread_enabled & VM_OBJECT_ALLOC_BIT) != 0);
 632     JvmtiExport::set_should_post_sampled_object_alloc((any_env_thread_enabled & SAMPLED_OBJECT_ALLOC_BIT) != 0);
 633     JvmtiExport::set_should_post_fiber_scheduled((any_env_thread_enabled & FIBER_SCHEDULED_BIT) != 0);
 634     JvmtiExport::set_should_post_fiber_terminated((any_env_thread_enabled & FIBER_TERMINATED_BIT) != 0);
 635     JvmtiExport::set_should_post_fiber_mount((any_env_thread_enabled & FIBER_MOUNT_BIT) != 0);
 636     JvmtiExport::set_should_post_fiber_unmount((any_env_thread_enabled & FIBER_UNMOUNT_BIT) != 0);
 637     JvmtiExport::set_should_post_continuation_run((any_env_thread_enabled & CONTINUATION_RUN_BIT) != 0);
 638     JvmtiExport::set_should_post_continuation_yield((any_env_thread_enabled & CONTINUATION_YIELD_BIT) != 0);
 639 
 640     // need this if we want thread events or we need them to init data
 641     JvmtiExport::set_should_post_thread_life((any_env_thread_enabled & NEED_THREAD_LIFE_EVENTS) != 0);
 642 
 643     // If single stepping is turned on or off, execute the VM op to change it.
 644     if (delta & SINGLE_STEP_BIT) {
 645       switch (JvmtiEnv::get_phase()) {
 646       case JVMTI_PHASE_DEAD:
 647         // If the VM is dying we can't execute VM ops
 648         break;
 649       case JVMTI_PHASE_LIVE: {
 650         VM_ChangeSingleStep op((any_env_thread_enabled & SINGLE_STEP_BIT) != 0);
 651         VMThread::execute(&op);
 652         break;
 653       }
 654       default:
 655         assert(false, "should never come here before live phase");
 656         break;
 657       }
 658     }


< prev index next >