< prev index next >

src/hotspot/share/gc/g1/g1RemSet.cpp

Print this page
rev 49539 : imported patch 8178105-switch-at-remark
rev 49542 : imported patch 8178105-8200371-assert-problem


 920                                         p2i(hr->bottom()),
 921                                         p2i(top_at_mark_start),
 922                                         p2i(top_at_rebuild_start));
 923 
 924         if (marked_bytes > 0) {
 925           total_marked_bytes += marked_bytes;
 926         }
 927         cur += chunk_size_in_words;
 928 
 929         _cm->do_yield_check();
 930         if (_cm->has_aborted()) {
 931           return true;
 932         }
 933       }
 934       // In the final iteration of the loop the region might have been eagerly reclaimed.
 935       // Simply filter out those regions. We can not just use region type because there
 936       // might have already been new allocations into these regions.
 937       DEBUG_ONLY(HeapWord* const top_at_rebuild_start = _cm->top_at_rebuild_start(region_idx);)
 938       assert(top_at_rebuild_start == NULL ||
 939              total_marked_bytes == hr->marked_bytes(),
 940              "Marked bytes " SIZE_FORMAT " for region %u (%s) in [bottom, TAMS) do not match liveness during mark " SIZE_FORMAT " "
 941              "(" PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT ")",
 942              total_marked_bytes, hr->hrm_index(), hr->get_type_str(), _cm->liveness(region_idx) * HeapWordSize,
 943              p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start));
 944        // Abort state may have changed after the yield check.
 945       return _cm->has_aborted();
 946     }
 947   };
 948 
 949   HeapRegionClaimer _hr_claimer;
 950   G1ConcurrentMark* _cm;
 951 
 952   uint _worker_id_offset;
 953 public:
 954   G1RebuildRemSetTask(G1ConcurrentMark* cm,
 955                       uint n_workers,
 956                       uint worker_id_offset) :
 957       AbstractGangTask("G1 Rebuild Remembered Set"),
 958       _cm(cm),
 959       _hr_claimer(n_workers),
 960       _worker_id_offset(worker_id_offset) {
 961   }
 962 


 920                                         p2i(hr->bottom()),
 921                                         p2i(top_at_mark_start),
 922                                         p2i(top_at_rebuild_start));
 923 
 924         if (marked_bytes > 0) {
 925           total_marked_bytes += marked_bytes;
 926         }
 927         cur += chunk_size_in_words;
 928 
 929         _cm->do_yield_check();
 930         if (_cm->has_aborted()) {
 931           return true;
 932         }
 933       }
 934       // In the final iteration of the loop the region might have been eagerly reclaimed.
 935       // Simply filter out those regions. We can not just use region type because there
 936       // might have already been new allocations into these regions.
 937       DEBUG_ONLY(HeapWord* const top_at_rebuild_start = _cm->top_at_rebuild_start(region_idx);)
 938       assert(top_at_rebuild_start == NULL ||
 939              total_marked_bytes == hr->marked_bytes(),
 940              "Marked bytes " SIZE_FORMAT " for region %u (%s) in [bottom, TAMS) do not match calculated marked bytes " SIZE_FORMAT " "
 941              "(" PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT ")",
 942              total_marked_bytes, hr->hrm_index(), hr->get_type_str(), hr->marked_bytes(),
 943              p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start));
 944        // Abort state may have changed after the yield check.
 945       return _cm->has_aborted();
 946     }
 947   };
 948 
 949   HeapRegionClaimer _hr_claimer;
 950   G1ConcurrentMark* _cm;
 951 
 952   uint _worker_id_offset;
 953 public:
 954   G1RebuildRemSetTask(G1ConcurrentMark* cm,
 955                       uint n_workers,
 956                       uint worker_id_offset) :
 957       AbstractGangTask("G1 Rebuild Remembered Set"),
 958       _cm(cm),
 959       _hr_claimer(n_workers),
 960       _worker_id_offset(worker_id_offset) {
 961   }
 962 
< prev index next >