< prev index next >

src/hotspot/share/prims/jvmtiManageCapabilities.cpp

Print this page

        

@@ -127,10 +127,12 @@
   jc.can_get_owned_monitor_info = 1;
   jc.can_get_owned_monitor_stack_depth_info = 1;
   jc.can_get_current_contended_monitor = 1;
   jc.can_generate_early_vmstart = 1;
   jc.can_generate_early_class_hook_events = 1;
+  jc.can_support_fibers = 1;
+  jc.can_support_continuations = 1;
   return jc;
 }
 
 
 jvmtiCapabilities JvmtiManageCapabilities::init_always_solo_capabilities() {

@@ -267,10 +269,15 @@
   exclude(&onload_solo_remaining_capabilities, desired, &onload_solo_remaining_capabilities);
 
   // return the result
   either(current, desired, result);
 
+  // special case for Fiber events
+  if (result->can_support_fibers == 1) {
+    java_lang_Fiber::set_notify_jvmti_events(true);
+  }
+
   update();
 
   return JVMTI_ERROR_NONE;
 }
 

@@ -362,12 +369,15 @@
   JvmtiExport::set_can_post_field_access(avail.can_generate_field_access_events);
   JvmtiExport::set_can_post_field_modification(avail.can_generate_field_modification_events);
   JvmtiExport::set_can_post_method_entry(avail.can_generate_method_entry_events);
   JvmtiExport::set_can_post_method_exit(avail.can_generate_method_exit_events ||
                                         avail.can_generate_frame_pop_events);
+  JvmtiExport::set_can_post_frame_pop(avail.can_generate_frame_pop_events);
   JvmtiExport::set_can_pop_frame(avail.can_pop_frame);
   JvmtiExport::set_can_force_early_return(avail.can_force_early_return);
+  JvmtiExport::set_can_support_fibers(avail.can_support_fibers);
+  JvmtiExport::set_can_support_continuations(avail.can_support_continuations);
   JvmtiExport::set_should_clean_up_heap_objects(avail.can_generate_breakpoint_events);
 }
 
 #ifndef PRODUCT
 

@@ -455,8 +465,12 @@
     log_trace(jvmti)("can_generate_resource_exhaustion_threads_events");
   if (cap->can_generate_early_vmstart)
     log_trace(jvmti)("can_generate_early_vmstart");
   if (cap->can_generate_early_class_hook_events)
     log_trace(jvmti)("can_generate_early_class_hook_events");
+  if (cap->can_support_fibers)
+    log_trace(jvmti)("can_support_fibers");
+  if (cap->can_support_continuations)
+    log_trace(jvmti)("can_support_continuations");
 }
 
 #endif
< prev index next >