< prev index next >

src/hotspot/share/prims/jvmtiThreadState.hpp

Print this page

 60 // in a JvmtiThreadState.
 61 // Note that this iteratation includes invalid environments pending
 62 // deallocation -- in fact, some uses depend on this behavior.
 63 //
 64 class JvmtiEnvThreadStateIterator : public StackObj {
 65  private:
 66   JvmtiThreadState* state;
 67  public:
 68   JvmtiEnvThreadStateIterator(JvmtiThreadState* thread_state);
 69   ~JvmtiEnvThreadStateIterator();
 70   JvmtiEnvThreadState* first();
 71   JvmtiEnvThreadState* next(JvmtiEnvThreadState* ets);
 72 };
 73 
 74 ///////////////////////////////////////////////////////////////
 75 //
 76 // class JvmtiVTMSTransitionDisabler
 77 //
 78 // Virtual Thread Mount State Transition (VTMS transition) mechanism
 79 //
 80 class JvmtiVTMSTransitionDisabler {
 81  private:
 82   static volatile int _VTMS_transition_disable_for_one_count; // transitions for one virtual thread are disabled while it is positive
 83   static volatile int _VTMS_transition_disable_for_all_count; // transitions for all virtual threads are disabled while it is positive
 84   static volatile bool _SR_mode;                         // there is an active suspender or resumer
 85   static volatile int _sync_protocol_enabled_count;      // current number of JvmtiVTMSTransitionDisablers enabled sync protocol
 86   static volatile bool _sync_protocol_enabled_permanently; // seen a suspender: JvmtiVTMSTransitionDisabler protocol is enabled permanently
 87 
 88   bool _is_SR;                                           // is suspender or resumer
 89   jthread _thread;                                       // virtual thread to disable transitions for, no-op if it is a platform thread
 90 
 91   DEBUG_ONLY(static void print_info();)
 92   void VTMS_transition_disable_for_one();
 93   void VTMS_transition_disable_for_all();
 94   void VTMS_transition_enable_for_one();
 95   void VTMS_transition_enable_for_all();
 96 
 97  public:
 98   static bool _VTMS_notify_jvmti_events;                 // enable notifications from VirtualThread about VTMS events
 99   static bool VTMS_notify_jvmti_events()             { return _VTMS_notify_jvmti_events; }
100   static void set_VTMS_notify_jvmti_events(bool val) { _VTMS_notify_jvmti_events = val; }

 60 // in a JvmtiThreadState.
 61 // Note that this iteratation includes invalid environments pending
 62 // deallocation -- in fact, some uses depend on this behavior.
 63 //
 64 class JvmtiEnvThreadStateIterator : public StackObj {
 65  private:
 66   JvmtiThreadState* state;
 67  public:
 68   JvmtiEnvThreadStateIterator(JvmtiThreadState* thread_state);
 69   ~JvmtiEnvThreadStateIterator();
 70   JvmtiEnvThreadState* first();
 71   JvmtiEnvThreadState* next(JvmtiEnvThreadState* ets);
 72 };
 73 
 74 ///////////////////////////////////////////////////////////////
 75 //
 76 // class JvmtiVTMSTransitionDisabler
 77 //
 78 // Virtual Thread Mount State Transition (VTMS transition) mechanism
 79 //
 80 class JvmtiVTMSTransitionDisabler : public AnyObj {
 81  private:
 82   static volatile int _VTMS_transition_disable_for_one_count; // transitions for one virtual thread are disabled while it is positive
 83   static volatile int _VTMS_transition_disable_for_all_count; // transitions for all virtual threads are disabled while it is positive
 84   static volatile bool _SR_mode;                         // there is an active suspender or resumer
 85   static volatile int _sync_protocol_enabled_count;      // current number of JvmtiVTMSTransitionDisablers enabled sync protocol
 86   static volatile bool _sync_protocol_enabled_permanently; // seen a suspender: JvmtiVTMSTransitionDisabler protocol is enabled permanently
 87 
 88   bool _is_SR;                                           // is suspender or resumer
 89   jthread _thread;                                       // virtual thread to disable transitions for, no-op if it is a platform thread
 90 
 91   DEBUG_ONLY(static void print_info();)
 92   void VTMS_transition_disable_for_one();
 93   void VTMS_transition_disable_for_all();
 94   void VTMS_transition_enable_for_one();
 95   void VTMS_transition_enable_for_all();
 96 
 97  public:
 98   static bool _VTMS_notify_jvmti_events;                 // enable notifications from VirtualThread about VTMS events
 99   static bool VTMS_notify_jvmti_events()             { return _VTMS_notify_jvmti_events; }
100   static void set_VTMS_notify_jvmti_events(bool val) { _VTMS_notify_jvmti_events = val; }
< prev index next >