< prev index next >

src/hotspot/share/gc/g1/g1ParScanThreadState.hpp

Print this page

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

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