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




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
  26 #define SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
  27 
  28 #include "classfile/javaClasses.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "oops/oop.hpp"
  31 #include "runtime/thread.hpp"
  32 #include "utilities/top.hpp"

  33 
  34 // The following classes are used for operations
  35 // initiated by a Java thread but that must
  36 // take place in the VMThread.
  37 
  38 #define VM_OP_ENUM(type)   VMOp_##type,
  39 
  40 // Note: When new VM_XXX comes up, add 'XXX' to the template table.
  41 #define VM_OPS_DO(template)                       \
  42   template(Dummy)                                 \
  43   template(ThreadStop)                            \
  44   template(ThreadDump)                            \
  45   template(PrintThreads)                          \
  46   template(FindDeadlocks)                         \

  47   template(ForceSafepoint)                        \
  48   template(ForceAsyncSafepoint)                   \
  49   template(Deoptimize)                            \
  50   template(DeoptimizeFrame)                       \
  51   template(DeoptimizeAll)                         \
  52   template(ZombieAll)                             \
  53   template(UnlinkSymbols)                         \
  54   template(Verify)                                \
  55   template(PrintJNI)                              \
  56   template(HeapDumper)                            \
  57   template(DeoptimizeTheWorld)                    \
  58   template(CollectForMetadataAllocation)          \
  59   template(GC_HeapInspection)                     \
  60   template(GenCollectFull)                        \
  61   template(GenCollectFullConcurrent)              \
  62   template(GenCollectForAllocation)               \
  63   template(ParallelGCFailedAllocation)            \
  64   template(ParallelGCSystemGC)                    \
  65   template(CGC_Operation)                         \
  66   template(CMS_Initial_Mark)                      \


 213   // VM operation is executed.
 214   VM_ThreadStop(oop thread, oop throwable) {
 215     _thread    = thread;
 216     _throwable = throwable;
 217   }
 218   VMOp_Type type() const                         { return VMOp_ThreadStop; }
 219   oop target_thread() const                      { return _thread; }
 220   oop throwable() const                          { return _throwable;}
 221   void doit();
 222   // We deoptimize if top-most frame is compiled - this might require a C2I adapter to be generated
 223   bool allow_nested_vm_operations() const        { return true; }
 224   Mode evaluation_mode() const                   { return _async_safepoint; }
 225   bool is_cheap_allocated() const                { return true; }
 226 
 227   // GC support
 228   void oops_do(OopClosure* f) {
 229     f->do_oop(&_thread); f->do_oop(&_throwable);
 230   }
 231 };
 232 







 233 // dummy vm op, evaluated just to force a safepoint
 234 class VM_ForceSafepoint: public VM_Operation {
 235  public:
 236   VM_ForceSafepoint() {}
 237   void doit()         {}
 238   VMOp_Type type() const { return VMOp_ForceSafepoint; }
 239 };
 240 
 241 // dummy vm op, evaluated just to force a safepoint
 242 class VM_ForceAsyncSafepoint: public VM_Operation {
 243  public:
 244   VM_ForceAsyncSafepoint() {}
 245   void doit()              {}
 246   VMOp_Type type() const                         { return VMOp_ForceAsyncSafepoint; }
 247   Mode evaluation_mode() const                   { return _async_safepoint; }
 248   bool is_cheap_allocated() const                { return true; }
 249 };
 250 
 251 class VM_Deoptimize: public VM_Operation {
 252  public:




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
  26 #define SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
  27 
  28 #include "classfile/javaClasses.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "oops/oop.hpp"
  31 #include "runtime/thread.hpp"
  32 #include "utilities/top.hpp"
  33 #include "code/codeCache.hpp"
  34 
  35 // The following classes are used for operations
  36 // initiated by a Java thread but that must
  37 // take place in the VMThread.
  38 
  39 #define VM_OP_ENUM(type)   VMOp_##type,
  40 
  41 // Note: When new VM_XXX comes up, add 'XXX' to the template table.
  42 #define VM_OPS_DO(template)                       \
  43   template(Dummy)                                 \
  44   template(ThreadStop)                            \
  45   template(ThreadDump)                            \
  46   template(PrintThreads)                          \
  47   template(FindDeadlocks)                         \
  48   template(ClearICs)                              \
  49   template(ForceSafepoint)                        \
  50   template(ForceAsyncSafepoint)                   \
  51   template(Deoptimize)                            \
  52   template(DeoptimizeFrame)                       \
  53   template(DeoptimizeAll)                         \
  54   template(ZombieAll)                             \
  55   template(UnlinkSymbols)                         \
  56   template(Verify)                                \
  57   template(PrintJNI)                              \
  58   template(HeapDumper)                            \
  59   template(DeoptimizeTheWorld)                    \
  60   template(CollectForMetadataAllocation)          \
  61   template(GC_HeapInspection)                     \
  62   template(GenCollectFull)                        \
  63   template(GenCollectFullConcurrent)              \
  64   template(GenCollectForAllocation)               \
  65   template(ParallelGCFailedAllocation)            \
  66   template(ParallelGCSystemGC)                    \
  67   template(CGC_Operation)                         \
  68   template(CMS_Initial_Mark)                      \


 215   // VM operation is executed.
 216   VM_ThreadStop(oop thread, oop throwable) {
 217     _thread    = thread;
 218     _throwable = throwable;
 219   }
 220   VMOp_Type type() const                         { return VMOp_ThreadStop; }
 221   oop target_thread() const                      { return _thread; }
 222   oop throwable() const                          { return _throwable;}
 223   void doit();
 224   // We deoptimize if top-most frame is compiled - this might require a C2I adapter to be generated
 225   bool allow_nested_vm_operations() const        { return true; }
 226   Mode evaluation_mode() const                   { return _async_safepoint; }
 227   bool is_cheap_allocated() const                { return true; }
 228 
 229   // GC support
 230   void oops_do(OopClosure* f) {
 231     f->do_oop(&_thread); f->do_oop(&_throwable);
 232   }
 233 };
 234 
 235 class VM_ClearICs: public VM_Operation {
 236  public:
 237   VM_ClearICs() {}
 238   void doit()         { CodeCache::clear_inline_caches(); }
 239   VMOp_Type type() const { return VMOp_ClearICs; }
 240 };
 241 
 242 // dummy vm op, evaluated just to force a safepoint
 243 class VM_ForceSafepoint: public VM_Operation {
 244  public:
 245   VM_ForceSafepoint() {}
 246   void doit()         {}
 247   VMOp_Type type() const { return VMOp_ForceSafepoint; }
 248 };
 249 
 250 // dummy vm op, evaluated just to force a safepoint
 251 class VM_ForceAsyncSafepoint: public VM_Operation {
 252  public:
 253   VM_ForceAsyncSafepoint() {}
 254   void doit()              {}
 255   VMOp_Type type() const                         { return VMOp_ForceAsyncSafepoint; }
 256   Mode evaluation_mode() const                   { return _async_safepoint; }
 257   bool is_cheap_allocated() const                { return true; }
 258 };
 259 
 260 class VM_Deoptimize: public VM_Operation {
 261  public:


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