< prev index next >

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

Print this page
rev 50605 : Updated patch.
rev 50607 : Minor code cleanups.


  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_GC_G1_VM_OPERATIONS_G1_HPP
  26 #define SHARE_VM_GC_G1_VM_OPERATIONS_G1_HPP
  27 
  28 #include "gc/shared/gcId.hpp"
  29 #include "gc/shared/vmGCOperations.hpp"
  30 
  31 // VM_operations for the G1 collector.
  32 // VM_GC_Operation:
  33 //   - VM_CGC_Operation
  34 //   - VM_G1CollectForAllocation
  35 //   - VM_G1CollectFull

  36 
  37 class VM_G1CollectFull: public VM_GC_Operation {
  38 public:
  39   VM_G1CollectFull(uint gc_count_before,
  40                    uint full_gc_count_before,
  41                    GCCause::Cause cause)
  42     : VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
  43   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  44   virtual void doit();
  45   virtual const char* name() const {
  46     return "G1 Full collection";
  47   }
  48 };
  49 












  50 class VM_G1CollectForAllocation: public VM_CollectForAllocation {
  51 private:
  52   bool      _pause_succeeded;
  53 
  54   bool         _should_initiate_conc_mark;
  55   bool         _should_retry_gc;
  56   double       _target_pause_time_ms;
  57   uint         _old_marking_cycles_completed_before;
  58 public:
  59   VM_G1CollectForAllocation(size_t         word_size,
  60                             uint           gc_count_before,
  61                             GCCause::Cause gc_cause,
  62                             bool           should_initiate_conc_mark,
  63                             double         target_pause_time_ms);
  64   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  65   virtual bool doit_prologue();
  66   virtual void doit();
  67   virtual void doit_epilogue();
  68   virtual const char* name() const {
  69     return "G1 collect for allocation";




  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_GC_G1_VM_OPERATIONS_G1_HPP
  26 #define SHARE_VM_GC_G1_VM_OPERATIONS_G1_HPP
  27 
  28 #include "gc/shared/gcId.hpp"
  29 #include "gc/shared/vmGCOperations.hpp"
  30 
  31 // VM_operations for the G1 collector.
  32 // VM_GC_Operation:
  33 //   - VM_CGC_Operation
  34 //   - VM_G1CollectForAllocation
  35 //   - VM_G1CollectFull
  36 //   - VM_G1IdleCompaction
  37 
  38 class VM_G1CollectFull: public VM_GC_Operation {
  39 public:
  40   VM_G1CollectFull(uint gc_count_before,
  41                    uint full_gc_count_before,
  42                    GCCause::Cause cause)
  43     : VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
  44   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  45   virtual void doit();
  46   virtual const char* name() const {
  47     return "G1 Full collection";
  48   }
  49 };
  50 
  51 class VM_G1IdleCompaction : public VM_GC_Operation {
  52 public:
  53   VM_G1IdleCompaction(uint gc_count_before,
  54                       uint full_gc_count_before,
  55                       GCCause::Cause cause)
  56     : VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
  57   virtual VMOp_Type type() const { return VMOp_G1IdleCompaction; }
  58   virtual void doit();
  59   virtual const char* name() const {
  60     return "G1 Idle Compaction";
  61   }
  62 };
  63 class VM_G1CollectForAllocation: public VM_CollectForAllocation {
  64 private:
  65   bool      _pause_succeeded;
  66 
  67   bool         _should_initiate_conc_mark;
  68   bool         _should_retry_gc;
  69   double       _target_pause_time_ms;
  70   uint         _old_marking_cycles_completed_before;
  71 public:
  72   VM_G1CollectForAllocation(size_t         word_size,
  73                             uint           gc_count_before,
  74                             GCCause::Cause gc_cause,
  75                             bool           should_initiate_conc_mark,
  76                             double         target_pause_time_ms);
  77   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  78   virtual bool doit_prologue();
  79   virtual void doit();
  80   virtual void doit_epilogue();
  81   virtual const char* name() const {
  82     return "G1 collect for allocation";


< prev index next >