< prev index next >

src/hotspot/share/runtime/vmOperations.hpp

Print this page
rev 56098 : imported patch 8226705-8221734-baseline


  32 #include "runtime/threadSMR.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(None)                                  \
  44   template(Cleanup)                               \
  45   template(ThreadStop)                            \
  46   template(ThreadDump)                            \
  47   template(PrintThreads)                          \
  48   template(FindDeadlocks)                         \
  49   template(ClearICs)                              \
  50   template(ForceSafepoint)                        \
  51   template(ForceAsyncSafepoint)                   \
  52   template(Deoptimize)                            \
  53   template(DeoptimizeFrame)                       \
  54   template(DeoptimizeAll)                         \
  55   template(ZombieAll)                             \
  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(CMS_Initial_Mark)                      \
  68   template(CMS_Final_Remark)                      \
  69   template(G1CollectForAllocation)                \
  70   template(G1CollectFull)                         \
  71   template(G1Concurrent)                          \
  72   template(ZMarkStart)                            \


 299   VMOp_Type type() const { return VMOp_ICBufferFull; }
 300 };
 301 
 302 // empty asynchronous vm op, when forcing a safepoint to scavenge monitors
 303 class VM_ScavengeMonitors: public VM_ForceSafepoint {
 304  public:
 305   VMOp_Type type() const                         { return VMOp_ScavengeMonitors; }
 306   Mode evaluation_mode() const                   { return _async_safepoint; }
 307   bool is_cheap_allocated() const                { return true; }
 308 };
 309 
 310 // Base class for invoking parts of a gtest in a safepoint.
 311 // Derived classes provide the doit method.
 312 // Typically also need to transition the gtest thread from native to VM.
 313 class VM_GTestExecuteAtSafepoint: public VM_Operation {
 314  public:
 315   VMOp_Type type() const                         { return VMOp_GTestExecuteAtSafepoint; }
 316 
 317  protected:
 318   VM_GTestExecuteAtSafepoint() {}
 319 };
 320 
 321 class VM_Deoptimize: public VM_Operation {
 322  public:
 323   VM_Deoptimize() {}
 324   VMOp_Type type() const                        { return VMOp_Deoptimize; }
 325   void doit();
 326   bool allow_nested_vm_operations() const        { return true; }
 327 };
 328 
 329 class VM_MarkActiveNMethods: public VM_Operation {
 330  public:
 331   VM_MarkActiveNMethods() {}
 332   VMOp_Type type() const                         { return VMOp_MarkActiveNMethods; }
 333   void doit();
 334   bool allow_nested_vm_operations() const        { return true; }
 335 };
 336 
 337 // Deopt helper that can deoptimize frames in threads other than the
 338 // current thread.  Only used through Deoptimization::deoptimize_frame.
 339 class VM_DeoptimizeFrame: public VM_Operation {
 340   friend class Deoptimization;
 341 
 342  private:
 343   JavaThread* _thread;
 344   intptr_t*   _id;
 345   int _reason;
 346   VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id, int reason);




  32 #include "runtime/threadSMR.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(None)                                  \
  44   template(Cleanup)                               \
  45   template(ThreadStop)                            \
  46   template(ThreadDump)                            \
  47   template(PrintThreads)                          \
  48   template(FindDeadlocks)                         \
  49   template(ClearICs)                              \
  50   template(ForceSafepoint)                        \
  51   template(ForceAsyncSafepoint)                   \

  52   template(DeoptimizeFrame)                       \
  53   template(DeoptimizeAll)                         \
  54   template(ZombieAll)                             \
  55   template(Verify)                                \
  56   template(PrintJNI)                              \
  57   template(HeapDumper)                            \
  58   template(DeoptimizeTheWorld)                    \
  59   template(CollectForMetadataAllocation)          \
  60   template(GC_HeapInspection)                     \
  61   template(GenCollectFull)                        \
  62   template(GenCollectFullConcurrent)              \
  63   template(GenCollectForAllocation)               \
  64   template(ParallelGCFailedAllocation)            \
  65   template(ParallelGCSystemGC)                    \
  66   template(CMS_Initial_Mark)                      \
  67   template(CMS_Final_Remark)                      \
  68   template(G1CollectForAllocation)                \
  69   template(G1CollectFull)                         \
  70   template(G1Concurrent)                          \
  71   template(ZMarkStart)                            \


 298   VMOp_Type type() const { return VMOp_ICBufferFull; }
 299 };
 300 
 301 // empty asynchronous vm op, when forcing a safepoint to scavenge monitors
 302 class VM_ScavengeMonitors: public VM_ForceSafepoint {
 303  public:
 304   VMOp_Type type() const                         { return VMOp_ScavengeMonitors; }
 305   Mode evaluation_mode() const                   { return _async_safepoint; }
 306   bool is_cheap_allocated() const                { return true; }
 307 };
 308 
 309 // Base class for invoking parts of a gtest in a safepoint.
 310 // Derived classes provide the doit method.
 311 // Typically also need to transition the gtest thread from native to VM.
 312 class VM_GTestExecuteAtSafepoint: public VM_Operation {
 313  public:
 314   VMOp_Type type() const                         { return VMOp_GTestExecuteAtSafepoint; }
 315 
 316  protected:
 317   VM_GTestExecuteAtSafepoint() {}








 318 };
 319 
 320 class VM_MarkActiveNMethods: public VM_Operation {
 321  public:
 322   VM_MarkActiveNMethods() {}
 323   VMOp_Type type() const                         { return VMOp_MarkActiveNMethods; }
 324   void doit();
 325   bool allow_nested_vm_operations() const        { return true; }
 326 };
 327 
 328 // Deopt helper that can deoptimize frames in threads other than the
 329 // current thread.  Only used through Deoptimization::deoptimize_frame.
 330 class VM_DeoptimizeFrame: public VM_Operation {
 331   friend class Deoptimization;
 332 
 333  private:
 334   JavaThread* _thread;
 335   intptr_t*   _id;
 336   int _reason;
 337   VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id, int reason);


< prev index next >