@@ -237,6 +237,10 @@ class G1HeapRegion : public CHeapObj<mtGC> {
237
237
// Amount of dead data in the region.
238
238
size_t _garbage_bytes;
239
239
240
+ // Approximate number of references to this regions at the end of concurrent
241
+ // marking. We we do not mark through all objects, so this is an estimate.
242
+ size_t _incoming_refs;
243
+
240
244
// Data for young region survivor prediction.
241
245
uint _young_index_in_cset;
242
246
G1SurvRateGroup* _surv_rate_group;
@@ -339,6 +343,8 @@ class G1HeapRegion : public CHeapObj<mtGC> {
339
343
return capacity () - known_live_bytes;
340
344
}
341
345
346
+ size_t incoming_refs () { return _incoming_refs; }
347
+
342
348
inline bool is_collection_set_candidate () const ;
343
349
344
350
// Retrieve parsable bottom; since it may be modified concurrently, outside a
@@ -351,9 +357,9 @@ class G1HeapRegion : public CHeapObj<mtGC> {
351
357
// that the collector is about to start or has finished (concurrently)
352
358
// marking the heap.
353
359
354
- // Notify the region that concurrent marking has finished. Passes TAMS and the number of
355
- // bytes marked between bottom and TAMS.
356
- inline void note_end_of_marking (HeapWord* top_at_mark_start, size_t marked_bytes);
360
+ // Notify the region that concurrent marking has finished. Passes TAMS, the number of
361
+ // bytes marked between bottom and TAMS, and the estimate for incoming references .
362
+ inline void note_end_of_marking (HeapWord* top_at_mark_start, size_t marked_bytes, size_t incoming_refs );
357
363
358
364
// Notify the region that scrubbing has completed.
359
365
inline void note_end_of_scrubbing ();
0 commit comments