< prev index next >

src/share/vm/gc_implementation/g1/vm_operations_g1.hpp

Print this page
rev 7211 : 8058568: GC cleanup phase can cause G1 skipping a System.gc()
Summary: Marking G1 FullGC as a _full collection and passing down the correct before count.
Reviewed-by:


  43   bool      _pause_succeeded;
  44   AllocationContext_t _allocation_context;
  45 
  46 public:
  47   VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
  48                                  size_t       word_size,
  49                                  GCCause::Cause gc_cause)
  50     : VM_GC_Operation(gc_count_before, gc_cause),
  51       _word_size(word_size), _result(NULL), _pause_succeeded(false) { }
  52   HeapWord* result() { return _result; }
  53   bool pause_succeeded() { return _pause_succeeded; }
  54   void set_allocation_context(AllocationContext_t context) { _allocation_context = context; }
  55   AllocationContext_t  allocation_context() { return _allocation_context; }
  56 };
  57 
  58 class VM_G1CollectFull: public VM_GC_Operation {
  59 public:
  60   VM_G1CollectFull(unsigned int gc_count_before,
  61                    unsigned int full_gc_count_before,
  62                    GCCause::Cause cause)
  63     : VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { }
  64   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  65   virtual void doit();
  66   virtual const char* name() const {
  67     return "full garbage-first collection";
  68   }
  69 };
  70 
  71 class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest {
  72 public:
  73   VM_G1CollectForAllocation(unsigned int gc_count_before,
  74                             size_t       word_size);
  75   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  76   virtual void doit();
  77   virtual const char* name() const {
  78     return "garbage-first collection to satisfy allocation";
  79   }
  80 };
  81 
  82 class VM_G1IncCollectionPause: public VM_G1OperationWithAllocRequest {
  83 private:




  43   bool      _pause_succeeded;
  44   AllocationContext_t _allocation_context;
  45 
  46 public:
  47   VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
  48                                  size_t       word_size,
  49                                  GCCause::Cause gc_cause)
  50     : VM_GC_Operation(gc_count_before, gc_cause),
  51       _word_size(word_size), _result(NULL), _pause_succeeded(false) { }
  52   HeapWord* result() { return _result; }
  53   bool pause_succeeded() { return _pause_succeeded; }
  54   void set_allocation_context(AllocationContext_t context) { _allocation_context = context; }
  55   AllocationContext_t  allocation_context() { return _allocation_context; }
  56 };
  57 
  58 class VM_G1CollectFull: public VM_GC_Operation {
  59 public:
  60   VM_G1CollectFull(unsigned int gc_count_before,
  61                    unsigned int full_gc_count_before,
  62                    GCCause::Cause cause)
  63     : VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { }
  64   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  65   virtual void doit();
  66   virtual const char* name() const {
  67     return "full garbage-first collection";
  68   }
  69 };
  70 
  71 class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest {
  72 public:
  73   VM_G1CollectForAllocation(unsigned int gc_count_before,
  74                             size_t       word_size);
  75   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  76   virtual void doit();
  77   virtual const char* name() const {
  78     return "garbage-first collection to satisfy allocation";
  79   }
  80 };
  81 
  82 class VM_G1IncCollectionPause: public VM_G1OperationWithAllocRequest {
  83 private:


< prev index next >