< prev index next >

src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp

Print this page




1102     // if/when we decide that refs discovery is sufficiently
1103     // rare that the cost of the CAS's involved is in the
1104     // noise. That's a measurement that should be done, and
1105     // the code simplified if that turns out to be the case.
1106     return ConcGCThreads > 1;
1107   }
1108 
1109   // Override
1110   virtual void ref_processor_init();
1111 
1112   void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1113 
1114   // Space enquiries
1115   double occupancy() const { return ((double)used())/((double)capacity()); }
1116   size_t contiguous_available() const;
1117   size_t unsafe_max_alloc_nogc() const;
1118 
1119   // over-rides
1120   MemRegion used_region_at_save_marks() const;
1121 
1122   // Does a "full" (forced) collection invoked on this generation collect
1123   // the young generation as well?
1124   virtual bool full_collects_young_generation() const {
1125     return !ScavengeBeforeFullGC;
1126   }
1127 
1128   // Adjust quantities in the generation affected by
1129   // the compaction.
1130   void reset_after_compaction();
1131 
1132   // Allocation support
1133   HeapWord* allocate(size_t size, bool tlab);
1134   HeapWord* have_lock_and_allocate(size_t size, bool tlab);
1135   oop       promote(oop obj, size_t obj_size);
1136   HeapWord* par_allocate(size_t size, bool tlab) {
1137     return allocate(size, tlab);
1138   }
1139 
1140 
1141   // Used by CMSStats to track direct allocation.  The value is sampled and
1142   // reset after each young gen collection.
1143   size_t direct_allocated_words() const { return _direct_allocated_words; }
1144   void reset_direct_allocated_words()   { _direct_allocated_words = 0; }
1145 
1146   // Overrides for parallel promotion.
1147   virtual oop par_promote(int thread_num,




1102     // if/when we decide that refs discovery is sufficiently
1103     // rare that the cost of the CAS's involved is in the
1104     // noise. That's a measurement that should be done, and
1105     // the code simplified if that turns out to be the case.
1106     return ConcGCThreads > 1;
1107   }
1108 
1109   // Override
1110   virtual void ref_processor_init();
1111 
1112   void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1113 
1114   // Space enquiries
1115   double occupancy() const { return ((double)used())/((double)capacity()); }
1116   size_t contiguous_available() const;
1117   size_t unsafe_max_alloc_nogc() const;
1118 
1119   // over-rides
1120   MemRegion used_region_at_save_marks() const;
1121 






1122   // Adjust quantities in the generation affected by
1123   // the compaction.
1124   void reset_after_compaction();
1125 
1126   // Allocation support
1127   HeapWord* allocate(size_t size, bool tlab);
1128   HeapWord* have_lock_and_allocate(size_t size, bool tlab);
1129   oop       promote(oop obj, size_t obj_size);
1130   HeapWord* par_allocate(size_t size, bool tlab) {
1131     return allocate(size, tlab);
1132   }
1133 
1134 
1135   // Used by CMSStats to track direct allocation.  The value is sampled and
1136   // reset after each young gen collection.
1137   size_t direct_allocated_words() const { return _direct_allocated_words; }
1138   void reset_direct_allocated_words()   { _direct_allocated_words = 0; }
1139 
1140   // Overrides for parallel promotion.
1141   virtual oop par_promote(int thread_num,


< prev index next >