src/share/vm/runtime/vm_operations.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/vm_operations.hpp

Print this page
rev 6793 : 8054889: Compiler team's implementation task
Summary: Adding three new diagnostic commands for compiler
Reviewed-by:


  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   template(WhiteBoxOperation)                     \
 101   template(ClassLoaderStatsOperation)             \



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


 395   static bool vm_exited()                      { return _vm_exited; }
 396   static void block_if_vm_exited() {
 397     if (_vm_exited) {
 398       wait_if_vm_exited();
 399     }
 400   }
 401   VMOp_Type type() const { return VMOp_Exit; }
 402   void doit();
 403 };
 404 
 405 
 406 class VM_RotateGCLog: public VM_Operation {
 407  private:
 408   outputStream* _out;
 409 
 410  public:
 411   VM_RotateGCLog(outputStream* st) : _out(st) {}
 412   VMOp_Type type() const { return VMOp_RotateGCLog; }
 413   void doit() { gclog_or_tty->rotate_log(true, _out); }
 414 };































 415 
 416 #endif // SHARE_VM_RUNTIME_VM_OPERATIONS_HPP


  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   template(WhiteBoxOperation)                     \
 101   template(ClassLoaderStatsOperation)             \
 102   template(PrintCompileQueue)                     \
 103   template(PrintCodeList)                         \
 104   template(PrintCodeCache)                        \
 105 
 106 class VM_Operation: public CHeapObj<mtInternal> {
 107  public:
 108   enum Mode {
 109     _safepoint,       // blocking,        safepoint, vm_op C-heap allocated
 110     _no_safepoint,    // blocking,     no safepoint, vm_op C-Heap allocated
 111     _concurrent,      // non-blocking, no safepoint, vm_op C-Heap allocated
 112     _async_safepoint  // non-blocking,    safepoint, vm_op C-Heap allocated
 113   };
 114 
 115   enum VMOp_Type {
 116     VM_OPS_DO(VM_OP_ENUM)
 117     VMOp_Terminating
 118   };
 119 
 120  private:
 121   Thread*         _calling_thread;
 122   ThreadPriority  _priority;
 123   long            _timestamp;
 124   VM_Operation*   _next;


 398   static bool vm_exited()                      { return _vm_exited; }
 399   static void block_if_vm_exited() {
 400     if (_vm_exited) {
 401       wait_if_vm_exited();
 402     }
 403   }
 404   VMOp_Type type() const { return VMOp_Exit; }
 405   void doit();
 406 };
 407 
 408 
 409 class VM_RotateGCLog: public VM_Operation {
 410  private:
 411   outputStream* _out;
 412 
 413  public:
 414   VM_RotateGCLog(outputStream* st) : _out(st) {}
 415   VMOp_Type type() const { return VMOp_RotateGCLog; }
 416   void doit() { gclog_or_tty->rotate_log(true, _out); }
 417 };
 418 
 419 class VM_PrintCompileQueue: public VM_Operation {
 420  private:
 421   outputStream* _out;
 422 
 423  public:
 424   VM_PrintCompileQueue(outputStream* st) : _out(st) {}
 425   VMOp_Type type() const { return VMOp_PrintCompileQueue; }
 426   void doit();
 427 };
 428 
 429 class VM_PrintCodeList: public VM_Operation {
 430  private:
 431   outputStream* _out;
 432 
 433  public:
 434   VM_PrintCodeList(outputStream* st) : _out(st) {}
 435   VMOp_Type type() const { return VMOp_PrintCodeList; }
 436   void doit();
 437 };
 438 
 439 class VM_PrintCodeCache: public VM_Operation {
 440  private:
 441   outputStream* _out;
 442 
 443  public:
 444   VM_PrintCodeCache(outputStream* st) : _out(st) {}
 445   VMOp_Type type() const { return VMOp_PrintCodeCache; }
 446   void doit();
 447 };
 448 
 449 
 450 #endif // SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
src/share/vm/runtime/vm_operations.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File