1095 // Note: CMS does MT-discovery during the parallel-remark
1096 // phases. Use ReferenceProcessorMTMutator to make refs
1097 // discovery MT-safe during such phases or other parallel
1098 // discovery phases in the future. This may all go away
1099 // if/when we decide that refs discovery is sufficiently
1100 // rare that the cost of the CAS's involved is in the
1101 // noise. That's a measurement that should be done, and
1102 // the code simplified if that turns out to be the case.
1103 return ConcGCThreads > 1;
1104 }
1105
1106 // Override
1107 virtual void ref_processor_init();
1108
1109 void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1110
1111 // Space enquiries
1112 double occupancy() const { return ((double)used())/((double)capacity()); }
1113 size_t contiguous_available() const;
1114 size_t unsafe_max_alloc_nogc() const;
1115
1116 // over-rides
1117 MemRegion used_region_at_save_marks() const;
1118
1119 // Adjust quantities in the generation affected by
1120 // the compaction.
1121 void reset_after_compaction();
1122
1123 // Allocation support
1124 HeapWord* allocate(size_t size, bool tlab);
1125 HeapWord* have_lock_and_allocate(size_t size, bool tlab);
1126 oop promote(oop obj, size_t obj_size);
1127 HeapWord* par_allocate(size_t size, bool tlab) {
1128 return allocate(size, tlab);
1129 }
1130
1131
1132 // Used by CMSStats to track direct allocation. The value is sampled and
1133 // reset after each young gen collection.
1134 size_t direct_allocated_words() const { return _direct_allocated_words; }
|
1095 // Note: CMS does MT-discovery during the parallel-remark
1096 // phases. Use ReferenceProcessorMTMutator to make refs
1097 // discovery MT-safe during such phases or other parallel
1098 // discovery phases in the future. This may all go away
1099 // if/when we decide that refs discovery is sufficiently
1100 // rare that the cost of the CAS's involved is in the
1101 // noise. That's a measurement that should be done, and
1102 // the code simplified if that turns out to be the case.
1103 return ConcGCThreads > 1;
1104 }
1105
1106 // Override
1107 virtual void ref_processor_init();
1108
1109 void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
1110
1111 // Space enquiries
1112 double occupancy() const { return ((double)used())/((double)capacity()); }
1113 size_t contiguous_available() const;
1114 size_t unsafe_max_alloc_nogc() const;
1115 size_t used_stable() const;
1116
1117 // over-rides
1118 MemRegion used_region_at_save_marks() const;
1119
1120 // Adjust quantities in the generation affected by
1121 // the compaction.
1122 void reset_after_compaction();
1123
1124 // Allocation support
1125 HeapWord* allocate(size_t size, bool tlab);
1126 HeapWord* have_lock_and_allocate(size_t size, bool tlab);
1127 oop promote(oop obj, size_t obj_size);
1128 HeapWord* par_allocate(size_t size, bool tlab) {
1129 return allocate(size, tlab);
1130 }
1131
1132
1133 // Used by CMSStats to track direct allocation. The value is sampled and
1134 // reset after each young gen collection.
1135 size_t direct_allocated_words() const { return _direct_allocated_words; }
|