src/share/vm/runtime/vm_operations.hpp

Print this page




  79   template(GetOwnedMonitorInfo)                   \
  80   template(GetObjectMonitorUsage)                 \
  81   template(GetCurrentContendedMonitor)            \
  82   template(GetStackTrace)                         \
  83   template(GetMultipleStackTraces)                \
  84   template(GetAllStackTraces)                     \
  85   template(GetThreadListStackTraces)              \
  86   template(GetFrameCount)                         \
  87   template(GetFrameLocation)                      \
  88   template(ChangeBreakpoints)                     \
  89   template(GetOrSetLocal)                         \
  90   template(GetCurrentLocation)                    \
  91   template(EnterInterpOnlyMode)                   \
  92   template(ChangeSingleStep)                      \
  93   template(HeapWalkOperation)                     \
  94   template(HeapIterateOperation)                  \
  95   template(ReportJavaOutOfMemory)                 \
  96   template(JFRCheckpoint)                         \
  97   template(Exit)                                  \
  98   template(LinuxDllLoad)                          \

  99 
 100 class VM_Operation: public CHeapObj<mtInternal> {
 101  public:
 102   enum Mode {
 103     _safepoint,       // blocking,        safepoint, vm_op C-heap allocated
 104     _no_safepoint,    // blocking,     no safepoint, vm_op C-Heap allocated
 105     _concurrent,      // non-blocking, no safepoint, vm_op C-Heap allocated
 106     _async_safepoint  // non-blocking,    safepoint, vm_op C-Heap allocated
 107   };
 108 
 109   enum VMOp_Type {
 110     VM_OPS_DO(VM_OP_ENUM)
 111     VMOp_Terminating
 112   };
 113 
 114  private:
 115   Thread*         _calling_thread;
 116   ThreadPriority  _priority;
 117   long            _timestamp;
 118   VM_Operation*   _next;


 380 class VM_Exit: public VM_Operation {
 381  private:
 382   int  _exit_code;
 383   static volatile bool _vm_exited;
 384   static Thread * _shutdown_thread;
 385   static void wait_if_vm_exited();
 386  public:
 387   VM_Exit(int exit_code) {
 388     _exit_code = exit_code;
 389   }
 390   static int wait_for_threads_in_native_to_block();
 391   static int set_vm_exited();
 392   static bool vm_exited()                      { return _vm_exited; }
 393   static void block_if_vm_exited() {
 394     if (_vm_exited) {
 395       wait_if_vm_exited();
 396     }
 397   }
 398   VMOp_Type type() const { return VMOp_Exit; }
 399   void doit();











 400 };
 401 
 402 #endif // SHARE_VM_RUNTIME_VM_OPERATIONS_HPP


  79   template(GetOwnedMonitorInfo)                   \
  80   template(GetObjectMonitorUsage)                 \
  81   template(GetCurrentContendedMonitor)            \
  82   template(GetStackTrace)                         \
  83   template(GetMultipleStackTraces)                \
  84   template(GetAllStackTraces)                     \
  85   template(GetThreadListStackTraces)              \
  86   template(GetFrameCount)                         \
  87   template(GetFrameLocation)                      \
  88   template(ChangeBreakpoints)                     \
  89   template(GetOrSetLocal)                         \
  90   template(GetCurrentLocation)                    \
  91   template(EnterInterpOnlyMode)                   \
  92   template(ChangeSingleStep)                      \
  93   template(HeapWalkOperation)                     \
  94   template(HeapIterateOperation)                  \
  95   template(ReportJavaOutOfMemory)                 \
  96   template(JFRCheckpoint)                         \
  97   template(Exit)                                  \
  98   template(LinuxDllLoad)                          \
  99   template(RotateGCLog)                           \
 100 
 101 class VM_Operation: public CHeapObj<mtInternal> {
 102  public:
 103   enum Mode {
 104     _safepoint,       // blocking,        safepoint, vm_op C-heap allocated
 105     _no_safepoint,    // blocking,     no safepoint, vm_op C-Heap allocated
 106     _concurrent,      // non-blocking, no safepoint, vm_op C-Heap allocated
 107     _async_safepoint  // non-blocking,    safepoint, vm_op C-Heap allocated
 108   };
 109 
 110   enum VMOp_Type {
 111     VM_OPS_DO(VM_OP_ENUM)
 112     VMOp_Terminating
 113   };
 114 
 115  private:
 116   Thread*         _calling_thread;
 117   ThreadPriority  _priority;
 118   long            _timestamp;
 119   VM_Operation*   _next;


 381 class VM_Exit: public VM_Operation {
 382  private:
 383   int  _exit_code;
 384   static volatile bool _vm_exited;
 385   static Thread * _shutdown_thread;
 386   static void wait_if_vm_exited();
 387  public:
 388   VM_Exit(int exit_code) {
 389     _exit_code = exit_code;
 390   }
 391   static int wait_for_threads_in_native_to_block();
 392   static int set_vm_exited();
 393   static bool vm_exited()                      { return _vm_exited; }
 394   static void block_if_vm_exited() {
 395     if (_vm_exited) {
 396       wait_if_vm_exited();
 397     }
 398   }
 399   VMOp_Type type() const { return VMOp_Exit; }
 400   void doit();
 401 };
 402 
 403 
 404 class VM_RotateGCLog: public VM_Operation {
 405  private:
 406   outputStream* _out;
 407 
 408  public:
 409   VM_RotateGCLog(outputStream* st) : _out(st) {}
 410   VMOp_Type type() const { return VMOp_RotateGCLog; }
 411   void doit() { gclog_or_tty->rotate_log(true, _out); }
 412 };
 413 
 414 #endif // SHARE_VM_RUNTIME_VM_OPERATIONS_HPP