< prev index next >

src/hotspot/share/prims/jvmtiEventController.cpp

Print this page

        

@@ -83,21 +83,29 @@
 static const jlong  GARBAGE_COLLECTION_FINISH_BIT = (((jlong)1) << (JVMTI_EVENT_GARBAGE_COLLECTION_FINISH - TOTAL_MIN_EVENT_TYPE_VAL));
 static const jlong  OBJECT_FREE_BIT = (((jlong)1) << (JVMTI_EVENT_OBJECT_FREE - TOTAL_MIN_EVENT_TYPE_VAL));
 static const jlong  RESOURCE_EXHAUSTED_BIT = (((jlong)1) << (JVMTI_EVENT_RESOURCE_EXHAUSTED - TOTAL_MIN_EVENT_TYPE_VAL));
 static const jlong  VM_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_VM_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));
 static const jlong  SAMPLED_OBJECT_ALLOC_BIT = (((jlong)1) << (JVMTI_EVENT_SAMPLED_OBJECT_ALLOC - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  FIBER_SCHEDULED_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_SCHEDULED - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  FIBER_TERMINATED_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_TERMINATED - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  FIBER_MOUNT_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_MOUNT - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  FIBER_UNMOUNT_BIT = (((jlong)1) << (JVMTI_EVENT_FIBER_UNMOUNT - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  CONTINUATION_RUN_BIT = (((jlong)1) << (JVMTI_EVENT_CONTINUATION_RUN - TOTAL_MIN_EVENT_TYPE_VAL));
+static const jlong  CONTINUATION_YIELD_BIT = (((jlong)1) << (JVMTI_EVENT_CONTINUATION_YIELD - TOTAL_MIN_EVENT_TYPE_VAL));
 
 // bits for extension events
 static const jlong  CLASS_UNLOAD_BIT = (((jlong)1) << (EXT_EVENT_CLASS_UNLOAD - TOTAL_MIN_EVENT_TYPE_VAL));
 
 
+static const jlong  FIBER_BITS = FIBER_SCHEDULED_BIT | FIBER_TERMINATED_BIT | FIBER_MOUNT_BIT | FIBER_UNMOUNT_BIT;
+static const jlong  CONTINUATION_BITS = CONTINUATION_RUN_BIT | CONTINUATION_YIELD_BIT;
 static const jlong  MONITOR_BITS = MONITOR_CONTENDED_ENTER_BIT | MONITOR_CONTENDED_ENTERED_BIT |
                           MONITOR_WAIT_BIT | MONITOR_WAITED_BIT;
 static const jlong  EXCEPTION_BITS = EXCEPTION_THROW_BIT | EXCEPTION_CATCH_BIT;
 static const jlong  INTERP_EVENT_BITS =  SINGLE_STEP_BIT | METHOD_ENTRY_BIT | METHOD_EXIT_BIT |
                                 FRAME_POP_BIT | FIELD_ACCESS_BIT | FIELD_MODIFICATION_BIT;
-static const jlong  THREAD_FILTERED_EVENT_BITS = INTERP_EVENT_BITS | EXCEPTION_BITS | MONITOR_BITS |
+static const jlong  THREAD_FILTERED_EVENT_BITS = INTERP_EVENT_BITS | EXCEPTION_BITS | MONITOR_BITS | FIBER_BITS | CONTINUATION_BITS |
                                         BREAKPOINT_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT | THREAD_END_BIT |
                                         SAMPLED_OBJECT_ALLOC_BIT;
 static const jlong  NEED_THREAD_LIFE_EVENTS = THREAD_FILTERED_EVENT_BITS | THREAD_START_BIT;
 static const jlong  EARLY_EVENT_BITS = CLASS_FILE_LOAD_HOOK_BIT | CLASS_LOAD_BIT | CLASS_PREPARE_BIT |
                                VM_START_BIT | VM_INIT_BIT | VM_DEATH_BIT | NATIVE_METHOD_BIND_BIT |

@@ -214,13 +222,10 @@
 {
 }
 
 
 void VM_EnterInterpOnlyMode::doit() {
-  // Set up the current stack depth for later tracking
-  _state->invalidate_cur_stack_depth();
-
   _state->enter_interp_only_mode();
 
   JavaThread *thread = _state->get_thread();
   if (thread->has_last_Java_frame()) {
     // If running in fullspeed mode, single stepping is implemented

@@ -229,11 +234,11 @@
     // second, we deoptimize all methods on the thread's stack when
     // interpreted-only mode is enabled the first time for a given
     // thread (nothing to do if no Java frames yet).
     int num_marked = 0;
     ResourceMark resMark;
-    RegisterMap rm(thread, false);
+    RegisterMap rm(thread, false, true);
     for (vframe* vf = thread->last_java_vframe(&rm); vf; vf = vf->sender()) {
       if (can_be_deoptimized(vf)) {
         ((compiledVFrame*) vf)->code()->mark_for_deoptimization();
         ++num_marked;
       }

@@ -623,10 +628,16 @@
     JvmtiExport::set_should_post_resource_exhausted((any_env_thread_enabled & RESOURCE_EXHAUSTED_BIT) != 0);
     JvmtiExport::set_should_post_compiled_method_load((any_env_thread_enabled & COMPILED_METHOD_LOAD_BIT) != 0);
     JvmtiExport::set_should_post_compiled_method_unload((any_env_thread_enabled & COMPILED_METHOD_UNLOAD_BIT) != 0);
     JvmtiExport::set_should_post_vm_object_alloc((any_env_thread_enabled & VM_OBJECT_ALLOC_BIT) != 0);
     JvmtiExport::set_should_post_sampled_object_alloc((any_env_thread_enabled & SAMPLED_OBJECT_ALLOC_BIT) != 0);
+    JvmtiExport::set_should_post_fiber_scheduled((any_env_thread_enabled & FIBER_SCHEDULED_BIT) != 0);
+    JvmtiExport::set_should_post_fiber_terminated((any_env_thread_enabled & FIBER_TERMINATED_BIT) != 0);
+    JvmtiExport::set_should_post_fiber_mount((any_env_thread_enabled & FIBER_MOUNT_BIT) != 0);
+    JvmtiExport::set_should_post_fiber_unmount((any_env_thread_enabled & FIBER_UNMOUNT_BIT) != 0);
+    JvmtiExport::set_should_post_continuation_run((any_env_thread_enabled & CONTINUATION_RUN_BIT) != 0);
+    JvmtiExport::set_should_post_continuation_yield((any_env_thread_enabled & CONTINUATION_YIELD_BIT) != 0);
 
     // need this if we want thread events or we need them to init data
     JvmtiExport::set_should_post_thread_life((any_env_thread_enabled & NEED_THREAD_LIFE_EVENTS) != 0);
 
     // If single stepping is turned on or off, execute the VM op to change it.
< prev index next >