File tree Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -575,7 +575,6 @@ void G1ConcurrentMark::clear_statistics(HeapRegion* r) {
575
575
for (uint j = 0 ; j < _max_num_tasks; ++j) {
576
576
_tasks[j]->clear_mark_stats_cache (region_idx);
577
577
}
578
- _top_at_mark_starts[region_idx] = _g1h->bottom_addr_for_region (region_idx);
579
578
_top_at_rebuild_starts[region_idx] = nullptr ;
580
579
_region_mark_stats[region_idx].clear ();
581
580
}
@@ -586,6 +585,16 @@ void G1ConcurrentMark::humongous_object_eagerly_reclaimed(HeapRegion* r) {
586
585
587
586
// Need to clear mark bit of the humongous object. Doing this unconditionally is fine.
588
587
mark_bitmap ()->clear (r->bottom ());
588
+
589
+ if (!_g1h->collector_state ()->mark_or_rebuild_in_progress ()) {
590
+ return ;
591
+ }
592
+
593
+ // Clear any statistics about the region gathered so far.
594
+ _g1h->humongous_obj_regions_iterate (r,
595
+ [&] (HeapRegion* r) {
596
+ clear_statistics (r);
597
+ });
589
598
}
590
599
591
600
void G1ConcurrentMark::reset_marking_for_restart () {
@@ -1465,6 +1474,7 @@ class G1ReclaimEmptyRegionsTask : public WorkerTask {
1465
1474
_g1h->free_region (hr, _local_cleanup_list);
1466
1475
}
1467
1476
hr->clear_cardtable ();
1477
+ _g1h->concurrent_mark ()->clear_statistics (hr);
1468
1478
}
1469
1479
1470
1480
return false ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ void HeapRegion::hr_clear(bool clear_space) {
124
124
125
125
rem_set ()->clear ();
126
126
127
- G1CollectedHeap::heap ()->concurrent_mark ()->clear_statistics (this );
127
+ G1CollectedHeap::heap ()->concurrent_mark ()->reset_top_at_mark_start (this );
128
128
129
129
_parsable_bottom = bottom ();
130
130
_garbage_bytes = 0 ;
Original file line number Diff line number Diff line change @@ -187,9 +187,9 @@ inline void HeapRegion::reset_skip_compacting_after_full_gc() {
187
187
}
188
188
189
189
inline void HeapRegion::reset_after_full_gc_common () {
190
- // After a full gc the mark bitmap in a movable region is invalid. Reset marking
190
+ // After a full gc the mark information in a movable region is invalid. Reset marking
191
191
// information.
192
- G1CollectedHeap::heap ()->concurrent_mark ()->clear_statistics (this ); // FIXME?
192
+ G1CollectedHeap::heap ()->concurrent_mark ()->reset_top_at_mark_start (this );
193
193
194
194
// Everything above bottom() is parsable and live.
195
195
reset_parsable_bottom ();
Original file line number Diff line number Diff line change @@ -1133,6 +1133,7 @@ class G1MergeHeapRootsTask : public WorkerTask {
1133
1133
// so the bitmap for the regions in the collection set must be cleared if not already.
1134
1134
if (should_clear_region (hr)) {
1135
1135
_g1h->clear_bitmap_for_region (hr);
1136
+ _g1h->concurrent_mark ()->reset_top_at_mark_start (hr);
1136
1137
} else {
1137
1138
assert_bitmap_clear (hr, _g1h->concurrent_mark ()->mark_bitmap ());
1138
1139
}
Original file line number Diff line number Diff line change @@ -555,7 +555,6 @@ class G1PostEvacuateCollectionSetCleanupTask2::ProcessEvacuationFailedRegionsTas
555
555
bool clear_mark_data = !g1h->collector_state ()->in_concurrent_start_gc () ||
556
556
g1h->policy ()->should_retain_evac_failed_region (r);
557
557
558
- cm->clear_statistics (r);
559
558
if (clear_mark_data) {
560
559
g1h->clear_bitmap_for_region (r);
561
560
} else {
You can’t perform that action at this time.
0 commit comments