< prev index next >

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

Print this page
rev 8138 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:


1047 
1048   // Reason generation was expanded
1049   CMSExpansionCause::Cause _expansion_cause;
1050 
1051   // In support of MinChunkSize being larger than min object size
1052   const double _dilatation_factor;
1053 
1054   // True if a compacting collection was done.
1055   bool _did_compact;
1056   bool did_compact() { return _did_compact; }
1057 
1058   // Fraction of current occupancy at which to start a CMS collection which
1059   // will collect this generation (at least).
1060   double _initiating_occupancy;
1061 
1062  protected:
1063   // Shrink generation by specified size (returns false if unable to shrink)
1064   void shrink_free_list_by(size_t bytes);
1065 
1066   // Update statistics for GC
1067   virtual void update_gc_stats(int level, bool full);
1068 
1069   // Maximum available space in the generation (including uncommitted)
1070   // space.
1071   size_t max_available() const;
1072 
1073   // getter and initializer for _initiating_occupancy field.
1074   double initiating_occupancy() const { return _initiating_occupancy; }
1075   void   init_initiating_occupancy(intx io, uintx tr);
1076 
1077   void expand_for_gc_cause(size_t bytes, size_t expand_bytes, CMSExpansionCause::Cause cause);
1078 
1079   void assert_correct_size_change_locking();
1080 
1081  public:
1082   ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size,
1083                                 int level, CardTableRS* ct,
1084                                 bool use_adaptive_freelists,
1085                                 FreeBlockDictionary<FreeChunk>::DictionaryChoice);
1086 
1087   // Accessors
1088   CMSCollector* collector() const { return _collector; }
1089   static void set_collector(CMSCollector* collector) {
1090     assert(_collector == NULL, "already set");
1091     _collector = collector;
1092   }
1093   CompactibleFreeListSpace*  cmsSpace() const { return _cmsSpace;  }
1094 
1095   Mutex* freelistLock() const;
1096 
1097   virtual Generation::Name kind() { return Generation::ConcurrentMarkSweep; }
1098 
1099   void set_did_compact(bool v) { _did_compact = v; }
1100 
1101   bool refs_discovery_is_atomic() const { return false; }
1102   bool refs_discovery_is_mt()     const {
1103     // Note: CMS does MT-discovery during the parallel-remark




1047 
1048   // Reason generation was expanded
1049   CMSExpansionCause::Cause _expansion_cause;
1050 
1051   // In support of MinChunkSize being larger than min object size
1052   const double _dilatation_factor;
1053 
1054   // True if a compacting collection was done.
1055   bool _did_compact;
1056   bool did_compact() { return _did_compact; }
1057 
1058   // Fraction of current occupancy at which to start a CMS collection which
1059   // will collect this generation (at least).
1060   double _initiating_occupancy;
1061 
1062  protected:
1063   // Shrink generation by specified size (returns false if unable to shrink)
1064   void shrink_free_list_by(size_t bytes);
1065 
1066   // Update statistics for GC
1067   virtual void update_gc_stats(Generation* current_generation, bool full);
1068 
1069   // Maximum available space in the generation (including uncommitted)
1070   // space.
1071   size_t max_available() const;
1072 
1073   // getter and initializer for _initiating_occupancy field.
1074   double initiating_occupancy() const { return _initiating_occupancy; }
1075   void   init_initiating_occupancy(intx io, uintx tr);
1076 
1077   void expand_for_gc_cause(size_t bytes, size_t expand_bytes, CMSExpansionCause::Cause cause);
1078 
1079   void assert_correct_size_change_locking();
1080 
1081  public:
1082   ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size,
1083                                 CardTableRS* ct,
1084                                 bool use_adaptive_freelists,
1085                                 FreeBlockDictionary<FreeChunk>::DictionaryChoice);
1086 
1087   // Accessors
1088   CMSCollector* collector() const { return _collector; }
1089   static void set_collector(CMSCollector* collector) {
1090     assert(_collector == NULL, "already set");
1091     _collector = collector;
1092   }
1093   CompactibleFreeListSpace*  cmsSpace() const { return _cmsSpace;  }
1094 
1095   Mutex* freelistLock() const;
1096 
1097   virtual Generation::Name kind() { return Generation::ConcurrentMarkSweep; }
1098 
1099   void set_did_compact(bool v) { _did_compact = v; }
1100 
1101   bool refs_discovery_is_atomic() const { return false; }
1102   bool refs_discovery_is_mt()     const {
1103     // Note: CMS does MT-discovery during the parallel-remark


< prev index next >