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

Print this page




1116   }
1117   CompactibleFreeListSpace*  cmsSpace() const { return _cmsSpace;  }
1118 
1119   Mutex* freelistLock() const;
1120 
1121   virtual Generation::Name kind() { return Generation::ConcurrentMarkSweep; }
1122 
1123   // Adaptive size policy
1124   CMSAdaptiveSizePolicy* size_policy();
1125 
1126   bool refs_discovery_is_atomic() const { return false; }
1127   bool refs_discovery_is_mt()     const {
1128     // Note: CMS does MT-discovery during the parallel-remark
1129     // phases. Use ReferenceProcessorMTMutator to make refs
1130     // discovery MT-safe during such phases or other parallel
1131     // discovery phases in the future. This may all go away
1132     // if/when we decide that refs discovery is sufficiently
1133     // rare that the cost of the CAS's involved is in the
1134     // noise. That's a measurement that should be done, and
1135     // the code simplified if that turns out to be the case.
1136     return false;
1137   }
1138 
1139   // Override
1140   virtual void ref_processor_init();
1141 
1142   // Grow generation by specified size (returns false if unable to grow)
1143   bool grow_by(size_t bytes);
1144   // Grow generation to reserved size.
1145   bool grow_to_reserved();
1146 
1147   void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1148 
1149   // Space enquiries
1150   size_t capacity() const;
1151   size_t used() const;
1152   size_t free() const;
1153   double occupancy() const { return ((double)used())/((double)capacity()); }
1154   size_t contiguous_available() const;
1155   size_t unsafe_max_alloc_nogc() const;
1156 




1116   }
1117   CompactibleFreeListSpace*  cmsSpace() const { return _cmsSpace;  }
1118 
1119   Mutex* freelistLock() const;
1120 
1121   virtual Generation::Name kind() { return Generation::ConcurrentMarkSweep; }
1122 
1123   // Adaptive size policy
1124   CMSAdaptiveSizePolicy* size_policy();
1125 
1126   bool refs_discovery_is_atomic() const { return false; }
1127   bool refs_discovery_is_mt()     const {
1128     // Note: CMS does MT-discovery during the parallel-remark
1129     // phases. Use ReferenceProcessorMTMutator to make refs
1130     // discovery MT-safe during such phases or other parallel
1131     // discovery phases in the future. This may all go away
1132     // if/when we decide that refs discovery is sufficiently
1133     // rare that the cost of the CAS's involved is in the
1134     // noise. That's a measurement that should be done, and
1135     // the code simplified if that turns out to be the case.
1136     return ConcGCThreads > 1;
1137   }
1138 
1139   // Override
1140   virtual void ref_processor_init();
1141 
1142   // Grow generation by specified size (returns false if unable to grow)
1143   bool grow_by(size_t bytes);
1144   // Grow generation to reserved size.
1145   bool grow_to_reserved();
1146 
1147   void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1148 
1149   // Space enquiries
1150   size_t capacity() const;
1151   size_t used() const;
1152   size_t free() const;
1153   double occupancy() const { return ((double)used())/((double)capacity()); }
1154   size_t contiguous_available() const;
1155   size_t unsafe_max_alloc_nogc() const;
1156