155 _rdc_local_qset.enqueue(ct()->byte_for_index(card_index));
156 _last_enqueued_card = card_index;
157 }
158 }
159
160 G1EvacuationRootClosures* closures() { return _closures; }
161 uint worker_id() { return _worker_id; }
162
163 size_t lab_waste_words() const;
164 size_t lab_undo_waste_words() const;
165
166 // Pass locally gathered statistics to global state. Returns the total number of
167 // HeapWords copied.
168 size_t flush(size_t* surviving_young_words);
169
170 private:
171 void do_partial_array(PartialArrayScanTask task);
172 void start_partial_objarray(G1HeapRegionAttr dest_dir, oop from, oop to);
173
174 HeapWord* allocate_copy_slow(G1HeapRegionAttr* dest_attr,
175 oop old,
176 size_t word_sz,
177 uint age,
178 uint node_index);
179
180 void undo_allocation(G1HeapRegionAttr dest_addr,
181 HeapWord* obj_ptr,
182 size_t word_sz,
183 uint node_index);
184
185 oop do_copy_to_survivor_space(G1HeapRegionAttr region_attr,
186 oop obj,
187 markWord old_mark);
188
189 // This method is applied to the fields of the objects that have just been copied.
190 template <class T> void do_oop_evac(T* p);
191
192 void dispatch_task(ScannerTask task);
193
194 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
195 // allocate into dest. Previous_plab_refill_failed indicates whether previous
196 // PLAB refill for the original (source) object failed.
197 // Returns a non-NULL pointer if successful, and updates dest if required.
198 // Also determines whether we should continue to try to allocate into the various
199 // generations or just end trying to allocate.
200 HeapWord* allocate_in_next_plab(G1HeapRegionAttr* dest,
201 size_t word_sz,
202 bool previous_plab_refill_failed,
203 uint node_index);
204
205 inline G1HeapRegionAttr next_region_attr(G1HeapRegionAttr const region_attr, markWord const m, uint& age);
206
207 void report_promotion_event(G1HeapRegionAttr const dest_attr,
208 oop const old, size_t word_sz, uint age,
209 HeapWord * const obj_ptr, uint node_index) const;
210
211 void trim_queue_to_threshold(uint threshold);
212
213 inline bool needs_partial_trimming() const;
214
215 // NUMA statistics related methods.
216 void initialize_numa_stats();
217 void flush_numa_stats();
218 inline void update_numa_stats(uint node_index);
219
220 public:
221 oop copy_to_survivor_space(G1HeapRegionAttr region_attr, oop obj, markWord old_mark);
222
223 inline void trim_queue();
224 inline void trim_queue_partially();
225 void steal_and_trim_queue(G1ScannerTasksQueueSet *task_queues);
226
227 Tickspan trim_ticks() const;
228 void reset_trim_ticks();
|
155 _rdc_local_qset.enqueue(ct()->byte_for_index(card_index));
156 _last_enqueued_card = card_index;
157 }
158 }
159
160 G1EvacuationRootClosures* closures() { return _closures; }
161 uint worker_id() { return _worker_id; }
162
163 size_t lab_waste_words() const;
164 size_t lab_undo_waste_words() const;
165
166 // Pass locally gathered statistics to global state. Returns the total number of
167 // HeapWords copied.
168 size_t flush(size_t* surviving_young_words);
169
170 private:
171 void do_partial_array(PartialArrayScanTask task);
172 void start_partial_objarray(G1HeapRegionAttr dest_dir, oop from, oop to);
173
174 HeapWord* allocate_copy_slow(G1HeapRegionAttr* dest_attr,
175 Klass* klass,
176 size_t word_sz,
177 uint age,
178 uint node_index);
179
180 void undo_allocation(G1HeapRegionAttr dest_addr,
181 HeapWord* obj_ptr,
182 size_t word_sz,
183 uint node_index);
184
185 oop do_copy_to_survivor_space(G1HeapRegionAttr region_attr,
186 oop obj,
187 markWord old_mark);
188
189 // This method is applied to the fields of the objects that have just been copied.
190 template <class T> void do_oop_evac(T* p);
191
192 void dispatch_task(ScannerTask task);
193
194 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
195 // allocate into dest. Previous_plab_refill_failed indicates whether previous
196 // PLAB refill for the original (source) object failed.
197 // Returns a non-NULL pointer if successful, and updates dest if required.
198 // Also determines whether we should continue to try to allocate into the various
199 // generations or just end trying to allocate.
200 HeapWord* allocate_in_next_plab(G1HeapRegionAttr* dest,
201 size_t word_sz,
202 bool previous_plab_refill_failed,
203 uint node_index);
204
205 inline G1HeapRegionAttr next_region_attr(G1HeapRegionAttr const region_attr, markWord const m, uint& age);
206
207 void report_promotion_event(G1HeapRegionAttr const dest_attr,
208 Klass* klass, size_t word_sz, uint age,
209 HeapWord * const obj_ptr, uint node_index) const;
210
211 void trim_queue_to_threshold(uint threshold);
212
213 inline bool needs_partial_trimming() const;
214
215 // NUMA statistics related methods.
216 void initialize_numa_stats();
217 void flush_numa_stats();
218 inline void update_numa_stats(uint node_index);
219
220 public:
221 oop copy_to_survivor_space(G1HeapRegionAttr region_attr, oop obj, markWord old_mark);
222
223 inline void trim_queue();
224 inline void trim_queue_partially();
225 void steal_and_trim_queue(G1ScannerTasksQueueSet *task_queues);
226
227 Tickspan trim_ticks() const;
228 void reset_trim_ticks();
|