< prev index next >

src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp

Print this page
rev 7318 : imported patch foreground
rev 7319 : [mq]: foreground-review-stefank
rev 7320 : [mq]: foreground-review-kim
rev 7321 : [mq]: remove-RotateCMSCollectionTypes


1023     _incremental_collection_failed = true;
1024   }
1025   void clear_incremental_collection_failed() {
1026     _incremental_collection_failed = false;
1027   }
1028 
1029   // accessors
1030   void set_expansion_cause(CMSExpansionCause::Cause v) { _expansion_cause = v;}
1031   CMSExpansionCause::Cause expansion_cause() const { return _expansion_cause; }
1032 
1033  private:
1034   // For parallel young-gen GC support.
1035   CMSParGCThreadState** _par_gc_thread_states;
1036 
1037   // Reason generation was expanded
1038   CMSExpansionCause::Cause _expansion_cause;
1039 
1040   // In support of MinChunkSize being larger than min object size
1041   const double _dilatation_factor;
1042 
1043   bool _debug_concurrent_cycle;
1044 
1045   // True if a compacting collection was done.
1046   bool _did_compact;
1047   bool did_compact() { return _did_compact; }
1048 
1049   // Fraction of current occupancy at which to start a CMS collection which
1050   // will collect this generation (at least).
1051   double _initiating_occupancy;
1052 
1053  protected:
1054   // Shrink generation by specified size (returns false if unable to shrink)
1055   void shrink_free_list_by(size_t bytes);
1056 
1057   // Update statistics for GC
1058   virtual void update_gc_stats(int level, bool full);
1059 
1060   // Maximum available space in the generation (including uncommitted)
1061   // space.
1062   size_t max_available() const;
1063 
1064   // getter and initializer for _initiating_occupancy field.


1251   void sample_eden_chunk() {
1252     //Delegate to collector
1253     return collector()->sample_eden_chunk();
1254   }
1255 
1256   // Printing
1257   const char* name() const;
1258   virtual const char* short_name() const { return "CMS"; }
1259   void        print() const;
1260   void printOccupancy(const char* s);
1261   bool must_be_youngest() const { return false; }
1262   bool must_be_oldest()   const { return true; }
1263 
1264   // Resize the generation after a compacting GC.  The
1265   // generation can be treated as a contiguous space
1266   // after the compaction.
1267   virtual void compute_new_size();
1268   // Resize the generation after a non-compacting
1269   // collection.
1270   void compute_new_size_free_list();
1271 
1272   bool debug_concurrent_cycle() { return _debug_concurrent_cycle; }
1273   void rotate_debug_collection_type();
1274 };
1275 
1276 //
1277 // Closures of various sorts used by CMS to accomplish its work
1278 //
1279 
1280 // This closure is used to do concurrent marking from the roots
1281 // following the first checkpoint.
1282 class MarkFromRootsClosure: public BitMapClosure {
1283   CMSCollector*  _collector;
1284   MemRegion      _span;
1285   CMSBitMap*     _bitMap;
1286   CMSBitMap*     _mut;
1287   CMSMarkStack*  _markStack;
1288   bool           _yield;
1289   int            _skipBits;
1290   HeapWord*      _finger;
1291   HeapWord*      _threshold;
1292   DEBUG_ONLY(bool _verifying;)
1293 




1023     _incremental_collection_failed = true;
1024   }
1025   void clear_incremental_collection_failed() {
1026     _incremental_collection_failed = false;
1027   }
1028 
1029   // accessors
1030   void set_expansion_cause(CMSExpansionCause::Cause v) { _expansion_cause = v;}
1031   CMSExpansionCause::Cause expansion_cause() const { return _expansion_cause; }
1032 
1033  private:
1034   // For parallel young-gen GC support.
1035   CMSParGCThreadState** _par_gc_thread_states;
1036 
1037   // Reason generation was expanded
1038   CMSExpansionCause::Cause _expansion_cause;
1039 
1040   // In support of MinChunkSize being larger than min object size
1041   const double _dilatation_factor;
1042 


1043   // True if a compacting collection was done.
1044   bool _did_compact;
1045   bool did_compact() { return _did_compact; }
1046 
1047   // Fraction of current occupancy at which to start a CMS collection which
1048   // will collect this generation (at least).
1049   double _initiating_occupancy;
1050 
1051  protected:
1052   // Shrink generation by specified size (returns false if unable to shrink)
1053   void shrink_free_list_by(size_t bytes);
1054 
1055   // Update statistics for GC
1056   virtual void update_gc_stats(int level, bool full);
1057 
1058   // Maximum available space in the generation (including uncommitted)
1059   // space.
1060   size_t max_available() const;
1061 
1062   // getter and initializer for _initiating_occupancy field.


1249   void sample_eden_chunk() {
1250     //Delegate to collector
1251     return collector()->sample_eden_chunk();
1252   }
1253 
1254   // Printing
1255   const char* name() const;
1256   virtual const char* short_name() const { return "CMS"; }
1257   void        print() const;
1258   void printOccupancy(const char* s);
1259   bool must_be_youngest() const { return false; }
1260   bool must_be_oldest()   const { return true; }
1261 
1262   // Resize the generation after a compacting GC.  The
1263   // generation can be treated as a contiguous space
1264   // after the compaction.
1265   virtual void compute_new_size();
1266   // Resize the generation after a non-compacting
1267   // collection.
1268   void compute_new_size_free_list();



1269 };
1270 
1271 //
1272 // Closures of various sorts used by CMS to accomplish its work
1273 //
1274 
1275 // This closure is used to do concurrent marking from the roots
1276 // following the first checkpoint.
1277 class MarkFromRootsClosure: public BitMapClosure {
1278   CMSCollector*  _collector;
1279   MemRegion      _span;
1280   CMSBitMap*     _bitMap;
1281   CMSBitMap*     _mut;
1282   CMSMarkStack*  _markStack;
1283   bool           _yield;
1284   int            _skipBits;
1285   HeapWord*      _finger;
1286   HeapWord*      _threshold;
1287   DEBUG_ONLY(bool _verifying;)
1288 


< prev index next >