comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 677:96b229c54d1e

6543938: G1: remove the concept of popularity Reviewed-by: iveresov, tonyp
author apetrusenko
date Wed, 25 Mar 2009 13:10:54 -0700
parents 0fbdb4381b99
children 315a5d70b295
comparison
equal deleted inserted replaced
649:59f139e8a8d1 677:96b229c54d1e
186 186
187 // Clear entries for the current region in any rem sets named in 187 // Clear entries for the current region in any rem sets named in
188 // the _outgoing_region_map. 188 // the _outgoing_region_map.
189 void clear_outgoing_entries(); 189 void clear_outgoing_entries();
190 190
191 #if MAYBE
192 // Audit the given card index.
193 void audit_card(size_t card_num, HeapRegion* hr, u2* rc_arr,
194 HeapRegionRemSet* empty_cards, size_t* one_obj_cards);
195
196 // Assumes that "audit_stage1" has been called for "hr", to set up
197 // "shadow" and "new_rs" appropriately. Identifies individual popular
198 // objects; returns "true" if any are found.
199 bool audit_find_pop(HeapRegion* hr, u2* rc_arr);
200
201 // Assumes that "audit_stage1" has been called for "hr", to set up
202 // "shadow" and "new_rs" appropriately. Identifies individual popular
203 // objects, and determines the number of entries in "new_rs" if any such
204 // popular objects are ignored. If this is sufficiently small, returns
205 // "false" to indicate that a constraint should not be introduced.
206 // Otherwise, returns "true" to indicate that we should go ahead with
207 // adding the constraint.
208 bool audit_stag(HeapRegion* hr, u2* rc_arr);
209
210
211 u2* alloc_rc_array();
212
213 SeqHeapRegionRemSet* audit_post(u2* rc_arr, size_t multi_obj_crds,
214 SeqHeapRegionRemSet* empty_cards);
215 #endif
216
217 enum ParIterState { Unclaimed, Claimed, Complete }; 191 enum ParIterState { Unclaimed, Claimed, Complete };
218 ParIterState _iter_state; 192 ParIterState _iter_state;
219 193
220 // Unused unless G1RecordHRRSOops is true. 194 // Unused unless G1RecordHRRSOops is true.
221 195
259 233
260 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); } 234 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); }
261 235
262 /* Used in the sequential case. Returns "true" iff this addition causes 236 /* Used in the sequential case. Returns "true" iff this addition causes
263 the size limit to be reached. */ 237 the size limit to be reached. */
264 bool add_reference(oop* from) { 238 void add_reference(oop* from) {
265 _other_regions.add_reference(from); 239 _other_regions.add_reference(from);
266 return false;
267 } 240 }
268 241
269 /* Used in the parallel case. Returns "true" iff this addition causes 242 /* Used in the parallel case. Returns "true" iff this addition causes
270 the size limit to be reached. */ 243 the size limit to be reached. */
271 bool add_reference(oop* from, int tid) { 244 void add_reference(oop* from, int tid) {
272 _other_regions.add_reference(from, tid); 245 _other_regions.add_reference(from, tid);
273 return false;
274 } 246 }
275 247
276 // Records the fact that the current region contains an outgoing 248 // Records the fact that the current region contains an outgoing
277 // reference into "to_hr". 249 // reference into "to_hr".
278 void add_outgoing_reference(HeapRegion* to_hr); 250 void add_outgoing_reference(HeapRegion* to_hr);
336 bool contains_reference(oop* from) const { 308 bool contains_reference(oop* from) const {
337 return _other_regions.contains_reference(from); 309 return _other_regions.contains_reference(from);
338 } 310 }
339 void print() const; 311 void print() const;
340 312
341 #if MAYBE
342 // We are about to introduce a constraint, requiring the collection time
343 // of the region owning this RS to be <= "hr", and forgetting pointers
344 // from the owning region to "hr." Before doing so, examines this rem
345 // set for pointers to "hr", possibly identifying some popular objects.,
346 // and possibly finding some cards to no longer contain pointers to "hr",
347 //
348 // These steps may prevent the the constraint from being necessary; in
349 // which case returns a set of cards now thought to contain no pointers
350 // into HR. In the normal (I assume) case, returns NULL, indicating that
351 // we should go ahead and add the constraint.
352 virtual SeqHeapRegionRemSet* audit(HeapRegion* hr) = 0;
353 #endif
354
355 // Called during a stop-world phase to perform any deferred cleanups. 313 // Called during a stop-world phase to perform any deferred cleanups.
356 // The second version may be called by parallel threads after then finish 314 // The second version may be called by parallel threads after then finish
357 // collection work. 315 // collection work.
358 static void cleanup(); 316 static void cleanup();
359 static void par_cleanup(); 317 static void par_cleanup();