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