equal
deleted
inserted
replaced
232 } |
232 } |
233 }; |
233 }; |
234 |
234 |
235 class ParNewGenTask: public AbstractGangTask { |
235 class ParNewGenTask: public AbstractGangTask { |
236 private: |
236 private: |
237 ParNewGeneration* _gen; |
237 ParNewGeneration* _young_gen; |
238 Generation* _old_gen; |
238 Generation* _old_gen; |
239 HeapWord* _young_old_boundary; |
239 HeapWord* _young_old_boundary; |
240 class ParScanThreadStateSet* _state_set; |
240 class ParScanThreadStateSet* _state_set; |
241 StrongRootsScope* _strong_roots_scope; |
241 StrongRootsScope* _strong_roots_scope; |
242 |
242 |
243 public: |
243 public: |
244 ParNewGenTask(ParNewGeneration* gen, |
244 ParNewGenTask(ParNewGeneration* young_gen, |
245 Generation* old_gen, |
245 Generation* old_gen, |
246 HeapWord* young_old_boundary, |
246 HeapWord* young_old_boundary, |
247 ParScanThreadStateSet* state_set, |
247 ParScanThreadStateSet* state_set, |
248 StrongRootsScope* strong_roots_scope); |
248 StrongRootsScope* strong_roots_scope); |
249 |
249 |
262 }; |
262 }; |
263 |
263 |
264 class EvacuateFollowersClosureGeneral: public VoidClosure { |
264 class EvacuateFollowersClosureGeneral: public VoidClosure { |
265 private: |
265 private: |
266 GenCollectedHeap* _gch; |
266 GenCollectedHeap* _gch; |
267 int _level; |
|
268 OopsInGenClosure* _scan_cur_or_nonheap; |
267 OopsInGenClosure* _scan_cur_or_nonheap; |
269 OopsInGenClosure* _scan_older; |
268 OopsInGenClosure* _scan_older; |
270 public: |
269 public: |
271 EvacuateFollowersClosureGeneral(GenCollectedHeap* gch, int level, |
270 EvacuateFollowersClosureGeneral(GenCollectedHeap* gch, |
272 OopsInGenClosure* cur, |
271 OopsInGenClosure* cur, |
273 OopsInGenClosure* older); |
272 OopsInGenClosure* older); |
274 virtual void do_void(); |
273 virtual void do_void(); |
275 }; |
274 }; |
276 |
275 |
286 }; |
285 }; |
287 |
286 |
288 // Implements AbstractRefProcTaskExecutor for ParNew. |
287 // Implements AbstractRefProcTaskExecutor for ParNew. |
289 class ParNewRefProcTaskExecutor: public AbstractRefProcTaskExecutor { |
288 class ParNewRefProcTaskExecutor: public AbstractRefProcTaskExecutor { |
290 private: |
289 private: |
291 ParNewGeneration& _generation; |
290 ParNewGeneration& _young_gen; |
|
291 Generation& _old_gen; |
292 ParScanThreadStateSet& _state_set; |
292 ParScanThreadStateSet& _state_set; |
293 public: |
293 public: |
294 ParNewRefProcTaskExecutor(ParNewGeneration& generation, |
294 ParNewRefProcTaskExecutor(ParNewGeneration& young_gen, |
|
295 Generation& old_gen, |
295 ParScanThreadStateSet& state_set) |
296 ParScanThreadStateSet& state_set) |
296 : _generation(generation), _state_set(state_set) |
297 : _young_gen(young_gen), _old_gen(old_gen), _state_set(state_set) |
297 { } |
298 { } |
298 |
299 |
299 // Executes a task using worker threads. |
300 // Executes a task using worker threads. |
300 virtual void execute(ProcessTask& task); |
301 virtual void execute(ProcessTask& task); |
301 virtual void execute(EnqueueTask& task); |
302 virtual void execute(EnqueueTask& task); |
351 |
352 |
352 bool survivor_overflow() { return _survivor_overflow; } |
353 bool survivor_overflow() { return _survivor_overflow; } |
353 void set_survivor_overflow(bool v) { _survivor_overflow = v; } |
354 void set_survivor_overflow(bool v) { _survivor_overflow = v; } |
354 |
355 |
355 public: |
356 public: |
356 ParNewGeneration(ReservedSpace rs, size_t initial_byte_size, int level); |
357 ParNewGeneration(ReservedSpace rs, size_t initial_byte_size); |
357 |
358 |
358 ~ParNewGeneration() { |
359 ~ParNewGeneration() { |
359 for (uint i = 0; i < ParallelGCThreads; i++) |
360 for (uint i = 0; i < ParallelGCThreads; i++) |
360 delete _task_queues->queue(i); |
361 delete _task_queues->queue(i); |
361 |
362 |