73 ObjToScanQueueSet* work_queue_set_, |
73 ObjToScanQueueSet* work_queue_set_, |
74 Stack<oop, mtGC>* overflow_stacks_, |
74 Stack<oop, mtGC>* overflow_stacks_, |
75 PreservedMarks* preserved_marks_, |
75 PreservedMarks* preserved_marks_, |
76 size_t desired_plab_sz_, |
76 size_t desired_plab_sz_, |
77 ParallelTaskTerminator& term_) : |
77 ParallelTaskTerminator& term_) : |
78 _to_space(to_space_), |
|
79 _old_gen(old_gen_), |
|
80 _young_gen(young_gen_), |
|
81 _thread_num(thread_num_), |
|
82 _work_queue(work_queue_set_->queue(thread_num_)), |
78 _work_queue(work_queue_set_->queue(thread_num_)), |
83 _to_space_full(false), |
|
84 _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL), |
79 _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL), |
85 _preserved_marks(preserved_marks_), |
80 _preserved_marks(preserved_marks_), |
86 _ageTable(false), // false ==> not the global age table, no perf data. |
|
87 _to_space_alloc_buffer(desired_plab_sz_), |
81 _to_space_alloc_buffer(desired_plab_sz_), |
88 _to_space_closure(young_gen_, this), |
82 _to_space_closure(young_gen_, this), |
89 _old_gen_closure(young_gen_, this), |
83 _old_gen_closure(young_gen_, this), |
90 _to_space_root_closure(young_gen_, this), |
84 _to_space_root_closure(young_gen_, this), |
|
85 _older_gen_closure(young_gen_, this), |
91 _old_gen_root_closure(young_gen_, this), |
86 _old_gen_root_closure(young_gen_, this), |
92 _older_gen_closure(young_gen_, this), |
|
93 _evacuate_followers(this, &_to_space_closure, &_old_gen_closure, |
87 _evacuate_followers(this, &_to_space_closure, &_old_gen_closure, |
94 &_to_space_root_closure, young_gen_, &_old_gen_root_closure, |
88 &_to_space_root_closure, young_gen_, &_old_gen_root_closure, |
95 work_queue_set_, &term_), |
89 work_queue_set_, &term_), |
96 _is_alive_closure(young_gen_), |
90 _is_alive_closure(young_gen_), |
97 _scan_weak_ref_closure(young_gen_, this), |
91 _scan_weak_ref_closure(young_gen_, this), |
98 _keep_alive_closure(&_scan_weak_ref_closure), |
92 _keep_alive_closure(&_scan_weak_ref_closure), |
|
93 _to_space(to_space_), |
|
94 _young_gen(young_gen_), |
|
95 _old_gen(old_gen_), |
|
96 _young_old_boundary(NULL), |
|
97 _thread_num(thread_num_), |
|
98 _ageTable(false), // false ==> not the global age table, no perf data. |
|
99 _to_space_full(false), |
99 _strong_roots_time(0.0), |
100 _strong_roots_time(0.0), |
100 _term_time(0.0) |
101 _term_time(0.0) |
101 { |
102 { |
102 #if TASKQUEUE_STATS |
103 #if TASKQUEUE_STATS |
103 _term_attempts = 0; |
104 _term_attempts = 0; |
342 ObjToScanQueueSet& queue_set, |
343 ObjToScanQueueSet& queue_set, |
343 Stack<oop, mtGC>* overflow_stacks, |
344 Stack<oop, mtGC>* overflow_stacks, |
344 PreservedMarksSet& preserved_marks_set, |
345 PreservedMarksSet& preserved_marks_set, |
345 size_t desired_plab_sz, |
346 size_t desired_plab_sz, |
346 ParallelTaskTerminator& term) |
347 ParallelTaskTerminator& term) |
347 : _young_gen(young_gen), |
348 : _term(term), |
|
349 _young_gen(young_gen), |
348 _old_gen(old_gen), |
350 _old_gen(old_gen), |
349 _term(term), |
|
350 _per_thread_states(NEW_RESOURCE_ARRAY(ParScanThreadState, num_threads)), |
351 _per_thread_states(NEW_RESOURCE_ARRAY(ParScanThreadState, num_threads)), |
351 _num_threads(num_threads) |
352 _num_threads(num_threads) |
352 { |
353 { |
353 assert(num_threads > 0, "sanity check!"); |
354 assert(num_threads > 0, "sanity check!"); |
354 assert(ParGCUseLocalOverflow == (overflow_stacks != NULL), |
355 assert(ParGCUseLocalOverflow == (overflow_stacks != NULL), |
527 ObjToScanQueueSet* task_queues_, |
528 ObjToScanQueueSet* task_queues_, |
528 ParallelTaskTerminator* terminator_) : |
529 ParallelTaskTerminator* terminator_) : |
529 |
530 |
530 _par_scan_state(par_scan_state_), |
531 _par_scan_state(par_scan_state_), |
531 _to_space_closure(to_space_closure_), |
532 _to_space_closure(to_space_closure_), |
|
533 _to_space_root_closure(to_space_root_closure_), |
532 _old_gen_closure(old_gen_closure_), |
534 _old_gen_closure(old_gen_closure_), |
533 _to_space_root_closure(to_space_root_closure_), |
|
534 _old_gen_root_closure(old_gen_root_closure_), |
535 _old_gen_root_closure(old_gen_root_closure_), |
535 _par_gen(par_gen_), |
536 _par_gen(par_gen_), |
536 _task_queues(task_queues_), |
537 _task_queues(task_queues_), |
537 _terminator(terminator_) |
538 _terminator(terminator_) |
538 {} |
539 {} |
623 _old_gen->par_oop_since_save_marks_iterate_done((int) worker_id); |
624 _old_gen->par_oop_since_save_marks_iterate_done((int) worker_id); |
624 } |
625 } |
625 |
626 |
626 ParNewGeneration::ParNewGeneration(ReservedSpace rs, size_t initial_byte_size) |
627 ParNewGeneration::ParNewGeneration(ReservedSpace rs, size_t initial_byte_size) |
627 : DefNewGeneration(rs, initial_byte_size, "PCopy"), |
628 : DefNewGeneration(rs, initial_byte_size, "PCopy"), |
|
629 _plab_stats("Young", YoungPLABSize, PLABWeight), |
628 _overflow_list(NULL), |
630 _overflow_list(NULL), |
629 _is_alive_closure(this), |
631 _is_alive_closure(this) |
630 _plab_stats("Young", YoungPLABSize, PLABWeight) |
|
631 { |
632 { |
632 NOT_PRODUCT(_overflow_counter = ParGCWorkQueueOverflowInterval;) |
633 NOT_PRODUCT(_overflow_counter = ParGCWorkQueueOverflowInterval;) |
633 NOT_PRODUCT(_num_par_pushes = 0;) |
634 NOT_PRODUCT(_num_par_pushes = 0;) |
634 _task_queues = new ObjToScanQueueSet(ParallelGCThreads); |
635 _task_queues = new ObjToScanQueueSet(ParallelGCThreads); |
635 guarantee(_task_queues != NULL, "task_queues allocation failure."); |
636 guarantee(_task_queues != NULL, "task_queues allocation failure."); |