158
159 inline void do_oop_partial_array(oop* p);
160
161 // This method is applied to the fields of the objects that have just been copied.
162 template <class T> inline void do_oop_evac(T* p, HeapRegion* from);
163
164 template <class T> inline void deal_with_reference(T* ref_to_scan);
165
166 inline void dispatch_reference(StarTask ref);
167
168 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
169 // allocate into dest. State is the original (source) cset state for the object
170 // that is allocated for. Previous_plab_refill_failed indicates whether previously
171 // a PLAB refill into "state" failed.
172 // Returns a non-NULL pointer if successful, and updates dest if required.
173 // Also determines whether we should continue to try to allocate into the various
174 // generations or just end trying to allocate.
175 HeapWord* allocate_in_next_plab(InCSetState const state,
176 InCSetState* dest,
177 size_t word_sz,
178 AllocationContext_t const context,
179 bool previous_plab_refill_failed);
180
181 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
182
183 void report_promotion_event(InCSetState const dest_state,
184 oop const old, size_t word_sz, uint age,
185 HeapWord * const obj_ptr, const AllocationContext_t context) const;
186 public:
187
188 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
189
190 void trim_queue();
191
192 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
193
194 // An attempt to evacuate "obj" has failed; take necessary steps.
195 oop handle_evacuation_failure_par(oop obj, markOop m);
196 };
197
198 class G1ParScanThreadStateSet : public StackObj {
199 G1CollectedHeap* _g1h;
200 G1ParScanThreadState** _states;
201 size_t* _surviving_young_words_total;
202 size_t _young_cset_length;
203 uint _n_workers;
204 bool _flushed;
205
|
158
159 inline void do_oop_partial_array(oop* p);
160
161 // This method is applied to the fields of the objects that have just been copied.
162 template <class T> inline void do_oop_evac(T* p, HeapRegion* from);
163
164 template <class T> inline void deal_with_reference(T* ref_to_scan);
165
166 inline void dispatch_reference(StarTask ref);
167
168 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
169 // allocate into dest. State is the original (source) cset state for the object
170 // that is allocated for. Previous_plab_refill_failed indicates whether previously
171 // a PLAB refill into "state" failed.
172 // Returns a non-NULL pointer if successful, and updates dest if required.
173 // Also determines whether we should continue to try to allocate into the various
174 // generations or just end trying to allocate.
175 HeapWord* allocate_in_next_plab(InCSetState const state,
176 InCSetState* dest,
177 size_t word_sz,
178 bool previous_plab_refill_failed);
179
180 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
181
182 void report_promotion_event(InCSetState const dest_state,
183 oop const old, size_t word_sz, uint age,
184 HeapWord * const obj_ptr) const;
185 public:
186
187 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
188
189 void trim_queue();
190
191 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
192
193 // An attempt to evacuate "obj" has failed; take necessary steps.
194 oop handle_evacuation_failure_par(oop obj, markOop m);
195 };
196
197 class G1ParScanThreadStateSet : public StackObj {
198 G1CollectedHeap* _g1h;
199 G1ParScanThreadState** _states;
200 size_t* _surviving_young_words_total;
201 size_t _young_cset_length;
202 uint _n_workers;
203 bool _flushed;
204
|