index next >

src/share/vm/gc_implementation/shared/vmGCOperations.hpp

Print this page
rev 7780 : imported patch 8072621
rev 7781 : imported patch 8066771
rev 7782 : [mq]: review


 151 
 152   ~VM_GC_HeapInspection() {}
 153   virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; }
 154   virtual bool skip_operation() const;
 155   virtual bool doit_prologue();
 156   virtual void doit();
 157   void set_csv_format(bool value) {_csv_format = value;}
 158   void set_print_help(bool value) {_print_help = value;}
 159   void set_print_class_stats(bool value) {_print_class_stats = value;}
 160   void set_columns(const char* value) {_columns = value;}
 161  protected:
 162   bool collect();
 163 };
 164 
 165 class VM_CollectForAllocation : public VM_GC_Operation {
 166  protected:
 167   size_t    _word_size; // Size of object to be allocated (in number of words)
 168   HeapWord* _result;    // Allocation result (NULL if allocation failed)
 169 
 170  public:
 171   VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause);

 172 
 173   HeapWord* result() const {
 174     return _result;
 175   }
 176 };
 177 
 178 class VM_GenCollectForAllocation : public VM_CollectForAllocation {
 179  private:
 180   bool        _tlab;                       // alloc is of a tlab.
 181  public:
 182   VM_GenCollectForAllocation(size_t word_size,
 183                              bool tlab,
 184                              uint gc_count_before)
 185     : VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure),
 186       _tlab(tlab) {}


 187   ~VM_GenCollectForAllocation()  {}
 188   virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
 189   virtual void doit();
 190 };
 191 
 192 // VM operation to invoke a collection of the heap as a
 193 // GenCollectedHeap heap.
 194 class VM_GenCollectFull: public VM_GC_Operation {
 195  private:
 196   int _max_level;
 197  public:
 198   VM_GenCollectFull(uint gc_count_before,
 199                     uint full_gc_count_before,
 200                     GCCause::Cause gc_cause,
 201                     int max_level)
 202     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
 203       _max_level(max_level) { }
 204   ~VM_GenCollectFull() {}
 205   virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
 206   virtual void doit();




 151 
 152   ~VM_GC_HeapInspection() {}
 153   virtual VMOp_Type type() const { return VMOp_GC_HeapInspection; }
 154   virtual bool skip_operation() const;
 155   virtual bool doit_prologue();
 156   virtual void doit();
 157   void set_csv_format(bool value) {_csv_format = value;}
 158   void set_print_help(bool value) {_print_help = value;}
 159   void set_print_class_stats(bool value) {_print_class_stats = value;}
 160   void set_columns(const char* value) {_columns = value;}
 161  protected:
 162   bool collect();
 163 };
 164 
 165 class VM_CollectForAllocation : public VM_GC_Operation {
 166  protected:
 167   size_t    _word_size; // Size of object to be allocated (in number of words)
 168   HeapWord* _result;    // Allocation result (NULL if allocation failed)
 169 
 170  public:
 171   VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause)
 172     : VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {}
 173 
 174   HeapWord* result() const {
 175     return _result;
 176   }
 177 };
 178 
 179 class VM_GenCollectForAllocation : public VM_CollectForAllocation {
 180  private:
 181   bool        _tlab;                       // alloc is of a tlab.
 182  public:
 183   VM_GenCollectForAllocation(size_t word_size,
 184                              bool tlab,
 185                              uint gc_count_before)
 186     : VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure),
 187       _tlab(tlab) {
 188     assert(word_size != 0, "An allocation should always be requested with this operation.");
 189   }
 190   ~VM_GenCollectForAllocation()  {}
 191   virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
 192   virtual void doit();
 193 };
 194 
 195 // VM operation to invoke a collection of the heap as a
 196 // GenCollectedHeap heap.
 197 class VM_GenCollectFull: public VM_GC_Operation {
 198  private:
 199   int _max_level;
 200  public:
 201   VM_GenCollectFull(uint gc_count_before,
 202                     uint full_gc_count_before,
 203                     GCCause::Cause gc_cause,
 204                     int max_level)
 205     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
 206       _max_level(max_level) { }
 207   ~VM_GenCollectFull() {}
 208   virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
 209   virtual void doit();


index next >