src/share/vm/gc_implementation/g1/heapRegion.cpp
Print this page
rev 6588 : 8047821: G1 Does not use the save_marks functionality as intended
Reviewed-by:
*** 371,381 ****
_orig_end = mr.end();
// Note that initialize() will set the start of the unmarked area of the
// region.
hr_clear(false /*par*/, false /*clear_space*/);
set_top(bottom());
! set_saved_mark();
assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant.");
}
CompactibleSpace* HeapRegion::next_compaction_space() const {
--- 371,381 ----
_orig_end = mr.end();
// Note that initialize() will set the start of the unmarked area of the
// region.
hr_clear(false /*par*/, false /*clear_space*/);
set_top(bottom());
! record_top_and_timestamp();
assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant.");
}
CompactibleSpace* HeapRegion::next_compaction_space() const {
*** 391,404 ****
index += 1;
}
return NULL;
}
- void HeapRegion::save_marks() {
- set_saved_mark();
- }
-
void HeapRegion::oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl) {
HeapWord* p = mr.start();
HeapWord* e = mr.end();
oop obj;
while (p < e) {
--- 391,400 ----
*** 406,426 ****
p += obj->oop_iterate(cl);
}
assert(p == e, "bad memregion: doesn't end on obj boundary");
}
- #define HeapRegion_OOP_SINCE_SAVE_MARKS_DEFN(OopClosureType, nv_suffix) \
- void HeapRegion::oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl) { \
- ContiguousSpace::oop_since_save_marks_iterate##nv_suffix(cl); \
- }
- SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DEFN)
-
-
- void HeapRegion::oop_before_save_marks_iterate(ExtendedOopClosure* cl) {
- oops_in_mr_iterate(MemRegion(bottom(), saved_mark_word()), cl);
- }
-
void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
bool during_conc_mark) {
// We always recreate the prev marking info and we'll explicitly
// mark all objects we find to be self-forwarded on the prev
// bitmap. So all objects need to be below PTAMS.
--- 402,411 ----
*** 1102,1112 ****
return top();
else
return ContiguousSpace::saved_mark_word();
}
! void G1OffsetTableContigSpace::set_saved_mark() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp();
if (_gc_time_stamp < curr_gc_time_stamp) {
// The order of these is important, as another thread might be
--- 1087,1097 ----
return top();
else
return ContiguousSpace::saved_mark_word();
}
! void G1OffsetTableContigSpace::record_top_and_timestamp() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp();
if (_gc_time_stamp < curr_gc_time_stamp) {
// The order of these is important, as another thread might be