< prev index next >

src/hotspot/share/gc/g1/g1VMOperations.hpp

Print this page

 63   bool transient_failure() const { return _transient_failure; }
 64   bool mark_in_progress() const { return _mark_in_progress; }
 65   bool cycle_already_in_progress() const { return _cycle_already_in_progress; }
 66   bool whitebox_attached() const { return _whitebox_attached; }
 67   bool gc_succeeded() const { return _gc_succeeded && VM_GC_Operation::gc_succeeded(); }
 68 };
 69 
 70 class VM_G1CollectForAllocation : public VM_CollectForAllocation {
 71 
 72 public:
 73   VM_G1CollectForAllocation(size_t word_size,
 74                             uint gc_count_before,
 75                             GCCause::Cause gc_cause);
 76   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
 77   virtual void doit();
 78 };
 79 
 80 // Concurrent G1 stop-the-world operations such as remark and cleanup.
 81 class VM_G1PauseConcurrent : public VM_Operation {
 82   uint         _gc_id;

 83   const char*  _message;
 84 
 85 protected:
 86   VM_G1PauseConcurrent(const char* message) :
 87     _gc_id(GCId::current()), _message(message) { }
 88   virtual void work() = 0;
 89 
 90   // Does this concurrent pause affect the memory pools? If so, update the collectionUsage()
 91   // MemoryMXBean for the old gen memory pool (which is the only pool registered for concurrent
 92   // pauses).
 93   virtual bool affects_memory_pools() const = 0;
 94 public:
 95   bool doit_prologue() override;
 96   void doit_epilogue() override;
 97   void doit() override;
 98   bool is_gc_operation() const override { return true; }
 99 };
100 
101 class VM_G1PauseRemark : public VM_G1PauseConcurrent {
102   bool affects_memory_pools() const override { return true; }
103 
104 public:
105   VM_G1PauseRemark() : VM_G1PauseConcurrent("Pause Remark") { }
106   VMOp_Type type() const override { return VMOp_G1PauseRemark; }
107   void work() override;
108 };
109 
110 class VM_G1PauseCleanup : public VM_G1PauseConcurrent {
111   bool affects_memory_pools() const override { return false; }
112 
113 public:
114   VM_G1PauseCleanup() : VM_G1PauseConcurrent("Pause Cleanup") { }
115   VMOp_Type type() const override { return VMOp_G1PauseCleanup; }
116   void work() override;
117 };
118 











119 #endif // SHARE_GC_G1_G1VMOPERATIONS_HPP

 63   bool transient_failure() const { return _transient_failure; }
 64   bool mark_in_progress() const { return _mark_in_progress; }
 65   bool cycle_already_in_progress() const { return _cycle_already_in_progress; }
 66   bool whitebox_attached() const { return _whitebox_attached; }
 67   bool gc_succeeded() const { return _gc_succeeded && VM_GC_Operation::gc_succeeded(); }
 68 };
 69 
 70 class VM_G1CollectForAllocation : public VM_CollectForAllocation {
 71 
 72 public:
 73   VM_G1CollectForAllocation(size_t word_size,
 74                             uint gc_count_before,
 75                             GCCause::Cause gc_cause);
 76   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
 77   virtual void doit();
 78 };
 79 
 80 // Concurrent G1 stop-the-world operations such as remark and cleanup.
 81 class VM_G1PauseConcurrent : public VM_Operation {
 82   uint         _gc_id;
 83   bool         _is_shutting_down;
 84   const char*  _message;
 85 
 86 protected:
 87   VM_G1PauseConcurrent(const char* message) :
 88     _gc_id(GCId::current()), _is_shutting_down(false), _message(message) { }
 89   virtual void work() = 0;
 90 
 91   // Does this concurrent pause affect the memory pools? If so, update the collectionUsage()
 92   // MemoryMXBean for the old gen memory pool (which is the only pool registered for concurrent
 93   // pauses).
 94   virtual bool affects_memory_pools() const = 0;
 95 public:
 96   bool doit_prologue() override;
 97   void doit_epilogue() override;
 98   void doit() override;
 99   bool is_gc_operation() const override { return true; }
100 };
101 
102 class VM_G1PauseRemark : public VM_G1PauseConcurrent {
103   bool affects_memory_pools() const override { return true; }
104 
105 public:
106   VM_G1PauseRemark() : VM_G1PauseConcurrent("Pause Remark") { }
107   VMOp_Type type() const override { return VMOp_G1PauseRemark; }
108   void work() override;
109 };
110 
111 class VM_G1PauseCleanup : public VM_G1PauseConcurrent {
112   bool affects_memory_pools() const override { return false; }
113 
114 public:
115   VM_G1PauseCleanup() : VM_G1PauseConcurrent("Pause Cleanup") { }
116   VMOp_Type type() const override { return VMOp_G1PauseCleanup; }
117   void work() override;
118 };
119 
120 class VM_G1StopMarking : public VM_Operation {
121 public:
122   VM_G1StopMarking() : VM_Operation() { }
123   VMOp_Type type() const override { return VMOp_G1StopMarking; }
124 
125   bool doit_prologue() override;
126   void doit() override;
127 
128   bool is_gc_operation() const override { return true; }
129 };
130 
131 #endif // SHARE_GC_G1_G1VMOPERATIONS_HPP
< prev index next >