< prev index next >

src/hotspot/share/services/attachListener.hpp

Print this page




  78   static bool is_init_trigger() NOT_SERVICES_RETURN_(false);
  79 
  80 #if !INCLUDE_SERVICES
  81   static bool is_attach_supported()             { return false; }
  82 #else
  83 
  84  private:
  85   static volatile AttachListenerState _state;
  86 
  87  public:
  88   static void set_state(AttachListenerState new_state) {
  89     Atomic::store(&_state, new_state);
  90   }
  91 
  92   static AttachListenerState get_state() {
  93     return Atomic::load(&_state);
  94   }
  95 
  96   static AttachListenerState transit_state(AttachListenerState new_state,
  97                                            AttachListenerState cmp_state) {
  98     return Atomic::cmpxchg(new_state, &_state, cmp_state);
  99   }
 100 
 101   static bool is_initialized() {
 102     return Atomic::load(&_state) == AL_INITIALIZED;
 103   }
 104 
 105   static void set_initialized() {
 106     Atomic::store(&_state, AL_INITIALIZED);
 107   }
 108 
 109   // indicates if this VM supports attach-on-demand
 110   static bool is_attach_supported()             { return !DisableAttachMechanism; }
 111 
 112   // platform specific initialization
 113   static int pd_init();
 114 
 115   // platform specific operation
 116   static AttachOperationFunctionInfo* pd_find_operation(const char* name);
 117 
 118   // platform specific flag change




  78   static bool is_init_trigger() NOT_SERVICES_RETURN_(false);
  79 
  80 #if !INCLUDE_SERVICES
  81   static bool is_attach_supported()             { return false; }
  82 #else
  83 
  84  private:
  85   static volatile AttachListenerState _state;
  86 
  87  public:
  88   static void set_state(AttachListenerState new_state) {
  89     Atomic::store(&_state, new_state);
  90   }
  91 
  92   static AttachListenerState get_state() {
  93     return Atomic::load(&_state);
  94   }
  95 
  96   static AttachListenerState transit_state(AttachListenerState new_state,
  97                                            AttachListenerState cmp_state) {
  98     return Atomic::cmpxchg(&_state, cmp_state, new_state);
  99   }
 100 
 101   static bool is_initialized() {
 102     return Atomic::load(&_state) == AL_INITIALIZED;
 103   }
 104 
 105   static void set_initialized() {
 106     Atomic::store(&_state, AL_INITIALIZED);
 107   }
 108 
 109   // indicates if this VM supports attach-on-demand
 110   static bool is_attach_supported()             { return !DisableAttachMechanism; }
 111 
 112   // platform specific initialization
 113   static int pd_init();
 114 
 115   // platform specific operation
 116   static AttachOperationFunctionInfo* pd_find_operation(const char* name);
 117 
 118   // platform specific flag change


< prev index next >