src/share/vm/gc_implementation/shared/vmGCOperations.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/shared

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

Print this page
rev 7215 : imported patch remove_levels
rev 7216 : imported patch cleanup


 169  public:
 170   VM_GenCollectForAllocation(size_t size,
 171                              bool tlab,
 172                              unsigned int gc_count_before)
 173     : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
 174       _size(size),
 175       _tlab(tlab) {
 176     _res = NULL;
 177   }
 178   ~VM_GenCollectForAllocation()  {}
 179   virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
 180   virtual void doit();
 181   HeapWord* result() const       { return _res; }
 182 };
 183 
 184 
 185 // VM operation to invoke a collection of the heap as a
 186 // GenCollectedHeap heap.
 187 class VM_GenCollectFull: public VM_GC_Operation {
 188  private:
 189   int _max_level;
 190  public:
 191   VM_GenCollectFull(unsigned int gc_count_before,
 192                     unsigned int full_gc_count_before,
 193                     GCCause::Cause gc_cause,
 194                       int max_level)
 195     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
 196       _max_level(max_level) { }
 197   ~VM_GenCollectFull() {}
 198   virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
 199   virtual void doit();
 200 };
 201 
 202 class VM_CollectForMetadataAllocation: public VM_GC_Operation {
 203  private:
 204   MetaWord*                _result;
 205   size_t                   _size;     // size of object to be allocated
 206   Metaspace::MetadataType  _mdtype;
 207   ClassLoaderData*         _loader_data;
 208  public:
 209   VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
 210                                   size_t size, Metaspace::MetadataType mdtype,

 211                                       unsigned int gc_count_before,
 212                                       unsigned int full_gc_count_before,
 213                                       GCCause::Cause gc_cause)
 214     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
 215       _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
 216   }
 217   virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; }
 218   virtual void doit();
 219   MetaWord* result() const       { return _result; }
 220 
 221   bool initiate_concurrent_GC();
 222 };
 223 
 224 class SvcGCMarker : public StackObj {
 225  private:
 226   JvmtiGCMarker _jgcm;
 227  public:
 228   typedef enum { MINOR, FULL, OTHER } reason_type;
 229 
 230   SvcGCMarker(reason_type reason ) {


 169  public:
 170   VM_GenCollectForAllocation(size_t size,
 171                              bool tlab,
 172                              unsigned int gc_count_before)
 173     : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
 174       _size(size),
 175       _tlab(tlab) {
 176     _res = NULL;
 177   }
 178   ~VM_GenCollectForAllocation()  {}
 179   virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
 180   virtual void doit();
 181   HeapWord* result() const       { return _res; }
 182 };
 183 
 184 
 185 // VM operation to invoke a collection of the heap as a
 186 // GenCollectedHeap heap.
 187 class VM_GenCollectFull: public VM_GC_Operation {
 188  private:
 189   Generation::Type _max_generation;
 190  public:
 191   VM_GenCollectFull(unsigned int gc_count_before,
 192                     unsigned int full_gc_count_before,
 193                     GCCause::Cause gc_cause,
 194                     Generation::Type max_generation)
 195     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
 196       _max_generation(max_generation) { }
 197   ~VM_GenCollectFull() {}
 198   virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
 199   virtual void doit();
 200 };
 201 
 202 class VM_CollectForMetadataAllocation: public VM_GC_Operation {
 203  private:
 204   MetaWord*                _result;
 205   size_t                   _size;     // size of object to be allocated
 206   Metaspace::MetadataType  _mdtype;
 207   ClassLoaderData*         _loader_data;
 208  public:
 209   VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
 210                                   size_t size,
 211                                   Metaspace::MetadataType mdtype,
 212                                   unsigned int gc_count_before,
 213                                   unsigned int full_gc_count_before,
 214                                   GCCause::Cause gc_cause)
 215     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
 216       _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
 217   }
 218   virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; }
 219   virtual void doit();
 220   MetaWord* result() const       { return _result; }
 221 
 222   bool initiate_concurrent_GC();
 223 };
 224 
 225 class SvcGCMarker : public StackObj {
 226  private:
 227   JvmtiGCMarker _jgcm;
 228  public:
 229   typedef enum { MINOR, FULL, OTHER } reason_type;
 230 
 231   SvcGCMarker(reason_type reason ) {
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File