169 public:
170 VM_GenCollectForAllocation(size_t size,
171 bool tlab,
172 unsigned int gc_count_before)
173 : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
174 _size(size),
175 _tlab(tlab) {
176 _res = NULL;
177 }
178 ~VM_GenCollectForAllocation() {}
179 virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
180 virtual void doit();
181 HeapWord* result() const { return _res; }
182 };
183
184
185 // VM operation to invoke a collection of the heap as a
186 // GenCollectedHeap heap.
187 class VM_GenCollectFull: public VM_GC_Operation {
188 private:
189 int _max_level;
190 public:
191 VM_GenCollectFull(unsigned int gc_count_before,
192 unsigned int full_gc_count_before,
193 GCCause::Cause gc_cause,
194 int max_level)
195 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
196 _max_level(max_level) { }
197 ~VM_GenCollectFull() {}
198 virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
199 virtual void doit();
200 };
201
202 class VM_CollectForMetadataAllocation: public VM_GC_Operation {
203 private:
204 MetaWord* _result;
205 size_t _size; // size of object to be allocated
206 Metaspace::MetadataType _mdtype;
207 ClassLoaderData* _loader_data;
208 public:
209 VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
210 size_t size, Metaspace::MetadataType mdtype,
211 unsigned int gc_count_before,
212 unsigned int full_gc_count_before,
213 GCCause::Cause gc_cause)
214 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
215 _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
216 }
|
169 public:
170 VM_GenCollectForAllocation(size_t size,
171 bool tlab,
172 unsigned int gc_count_before)
173 : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
174 _size(size),
175 _tlab(tlab) {
176 _res = NULL;
177 }
178 ~VM_GenCollectForAllocation() {}
179 virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
180 virtual void doit();
181 HeapWord* result() const { return _res; }
182 };
183
184
185 // VM operation to invoke a collection of the heap as a
186 // GenCollectedHeap heap.
187 class VM_GenCollectFull: public VM_GC_Operation {
188 private:
189 Generation::Type _max_generation;
190 public:
191 VM_GenCollectFull(unsigned int gc_count_before,
192 unsigned int full_gc_count_before,
193 GCCause::Cause gc_cause,
194 Generation::Type max_generation)
195 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
196 _max_generation(max_generation) { }
197 ~VM_GenCollectFull() {}
198 virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
199 virtual void doit();
200 };
201
202 class VM_CollectForMetadataAllocation: public VM_GC_Operation {
203 private:
204 MetaWord* _result;
205 size_t _size; // size of object to be allocated
206 Metaspace::MetadataType _mdtype;
207 ClassLoaderData* _loader_data;
208 public:
209 VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
210 size_t size, Metaspace::MetadataType mdtype,
211 unsigned int gc_count_before,
212 unsigned int full_gc_count_before,
213 GCCause::Cause gc_cause)
214 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
215 _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
216 }
|