@@ -73,28 +73,16 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
7373
7474 const bool _should_rebuild_remset;
7575
76- size_t _marked_words;
7776 size_t _processed_words;
7877
7978 const size_t ProcessingYieldLimitInWords = G1RebuildRemSetChunkSize / HeapWordSize;
8079
81- void reset_marked_words () {
82- _marked_words = 0 ;
83- }
84-
8580 void reset_processed_words () {
8681 _processed_words = 0 ;
8782 }
8883
89- void assert_marked_words (HeapRegion* hr) {
90- assert ((_marked_words * HeapWordSize) == hr->marked_bytes (),
91- " Mismatch between marking and re-calculation for region %u, %zu != %zu" ,
92- hr->hrm_index (), (_marked_words * HeapWordSize), hr->marked_bytes ());
93- }
94-
9584 void add_processed_words (size_t processed) {
9685 _processed_words += processed;
97- _marked_words += processed;
9886 }
9987
10088 // Yield if enough has been processed; returns if the concurrent marking cycle
@@ -228,7 +216,6 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
228216 bool scan_and_scrub_region (HeapRegion* hr, HeapWord* const pb) {
229217 assert (should_rebuild_or_scrub (hr), " must be" );
230218
231- reset_marked_words ();
232219 log_trace (gc, marking)(" Scrub and rebuild region: " HR_FORMAT " pb: " PTR_FORMAT " TARS: " PTR_FORMAT,
233220 HR_FORMAT_PARAMS (hr), p2i (pb), p2i (_cm->top_at_rebuild_start (hr->hrm_index ())));
234221
@@ -240,9 +227,6 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
240227 // Scrubbing completed for this region - notify that we are done with it, resetting
241228 // pb to bottom.
242229 hr->note_end_of_scrubbing ();
243- // Assert that the size of marked objects from the marking matches
244- // the size of the objects which we scanned to rebuild remembered sets.
245- assert_marked_words (hr);
246230
247231 // Rebuild from TAMS (= parsable_bottom) to TARS.
248232 if (scan_from_pb_to_tars (hr, pb, _cm->top_at_rebuild_start (hr->hrm_index ()))) {
@@ -270,7 +254,6 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
270254 assert (_bitmap->is_marked (humongous) || pb == hr->bottom (),
271255 " Humongous object not live" );
272256
273- reset_marked_words ();
274257 log_trace (gc, marking)(" Rebuild for humongous region: " HR_FORMAT " pb: " PTR_FORMAT " TARS: " PTR_FORMAT,
275258 HR_FORMAT_PARAMS (hr), p2i (pb), p2i (_cm->top_at_rebuild_start (hr->hrm_index ())));
276259
@@ -282,13 +265,6 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
282265 if (mark_aborted) {
283266 log_trace (gc, marking)(" Rebuild aborted for region: %u (%s)" , hr->hrm_index (), hr->get_short_type_str ());
284267 return true ;
285- } else if (_bitmap->is_marked (humongous) && should_rebuild_or_scrub (hr)) {
286- // Only verify that the marked size matches the rebuilt size if this object was marked
287- // and the object should still be handled. The should_rebuild_or_scrub() state can
288- // change during rebuild for humongous objects that are eagerly reclaimed so we need to
289- // check this.
290- // If the object has not been marked the size from marking will be 0.
291- assert_marked_words (hr);
292268 }
293269 return false ;
294270 }
@@ -299,7 +275,6 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
299275 _bitmap (_cm->mark_bitmap ()),
300276 _rebuild_closure(G1CollectedHeap::heap(), worker_id),
301277 _should_rebuild_remset(should_rebuild_remset),
302- _marked_words(0 ),
303278 _processed_words(0 ) { }
304279
305280 bool do_heap_region (HeapRegion* hr) {
0 commit comments