135 virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
136 virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
137 #if INCLUDE_ALL_GCS
138 virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
139 virtual G1CollectorPolicy* as_g1_policy() { return NULL; }
140 #endif // INCLUDE_ALL_GCS
141 // Note that these are not virtual.
142 bool is_generation_policy() { return as_generation_policy() != NULL; }
143 bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
144 #if INCLUDE_ALL_GCS
145 bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
146 bool is_g1_policy() { return as_g1_policy() != NULL; }
147 #else // INCLUDE_ALL_GCS
148 bool is_concurrent_mark_sweep_policy() { return false; }
149 bool is_g1_policy() { return false; }
150 #endif // INCLUDE_ALL_GCS
151
152
153 virtual BarrierSet::Name barrier_set_name() = 0;
154
155 // Create the remembered set (to cover the given reserved region,
156 // allowing breaking up into at most "max_covered_regions").
157 virtual GenRemSet* create_rem_set(MemRegion reserved,
158 int max_covered_regions);
159
160 // This method controls how a collector satisfies a request
161 // for a block of memory. "gc_time_limit_was_exceeded" will
162 // be set to true if the adaptive size policy determine that
163 // an excessive amount of time is being spent doing collections
164 // and caused a NULL to be returned. If a NULL is not returned,
165 // "gc_time_limit_was_exceeded" has an undefined meaning.
166 virtual HeapWord* mem_allocate_work(size_t size,
167 bool is_tlab,
168 bool* gc_overhead_limit_was_exceeded) = 0;
169
170 // This method controls how a collector handles one or more
171 // of its generations being fully allocated.
172 virtual HeapWord *satisfy_failed_allocation(size_t size, bool is_tlab) = 0;
173 // This method controls how a collector handles a metadata allocation
174 // failure.
175 virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
176 size_t size,
177 Metaspace::MetadataType mdtype);
178
|
135 virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
136 virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
137 #if INCLUDE_ALL_GCS
138 virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
139 virtual G1CollectorPolicy* as_g1_policy() { return NULL; }
140 #endif // INCLUDE_ALL_GCS
141 // Note that these are not virtual.
142 bool is_generation_policy() { return as_generation_policy() != NULL; }
143 bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
144 #if INCLUDE_ALL_GCS
145 bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
146 bool is_g1_policy() { return as_g1_policy() != NULL; }
147 #else // INCLUDE_ALL_GCS
148 bool is_concurrent_mark_sweep_policy() { return false; }
149 bool is_g1_policy() { return false; }
150 #endif // INCLUDE_ALL_GCS
151
152
153 virtual BarrierSet::Name barrier_set_name() = 0;
154
155 virtual GenRemSet* create_rem_set(MemRegion reserved);
156
157 // This method controls how a collector satisfies a request
158 // for a block of memory. "gc_time_limit_was_exceeded" will
159 // be set to true if the adaptive size policy determine that
160 // an excessive amount of time is being spent doing collections
161 // and caused a NULL to be returned. If a NULL is not returned,
162 // "gc_time_limit_was_exceeded" has an undefined meaning.
163 virtual HeapWord* mem_allocate_work(size_t size,
164 bool is_tlab,
165 bool* gc_overhead_limit_was_exceeded) = 0;
166
167 // This method controls how a collector handles one or more
168 // of its generations being fully allocated.
169 virtual HeapWord *satisfy_failed_allocation(size_t size, bool is_tlab) = 0;
170 // This method controls how a collector handles a metadata allocation
171 // failure.
172 virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
173 size_t size,
174 Metaspace::MetadataType mdtype);
175
|