提交 15e5f164 编写于 作者: M mgerdin

8047821: G1 Does not use the save_marks functionality as intended

Summary: Rename save_marks to record_top_and_timestamp and remove som unused but related methods
Reviewed-by: stefank, ehelin
上级 5bbd4e2a
......@@ -4361,7 +4361,7 @@ void G1CollectedHeap::init_gc_alloc_regions(EvacuationInfo& evacuation_info) {
!(retained_region->top() == retained_region->end()) &&
!retained_region->is_empty() &&
!retained_region->isHumongous()) {
retained_region->set_saved_mark();
retained_region->record_top_and_timestamp();
// The retained region was added to the old region set when it was
// retired. We have to remove it now, since we don't allow regions
// we allocate to in the region sets. We'll re-add it later, when
......@@ -6304,7 +6304,7 @@ HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
// We really only need to do this for old regions given that we
// should never scan survivors. But it doesn't hurt to do it
// for survivors too.
new_alloc_region->set_saved_mark();
new_alloc_region->record_top_and_timestamp();
if (survivor) {
new_alloc_region->set_survivor();
_hr_printer.alloc(new_alloc_region, G1HRPrinter::Survivor);
......
......@@ -373,7 +373,7 @@ HeapRegion::HeapRegion(uint hrs_index,
// region.
hr_clear(false /*par*/, false /*clear_space*/);
set_top(bottom());
set_saved_mark();
record_top_and_timestamp();
assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant.");
}
......@@ -393,32 +393,6 @@ CompactibleSpace* HeapRegion::next_compaction_space() const {
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) {
obj = oop(p);
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
......@@ -1107,7 +1081,7 @@ HeapWord* G1OffsetTableContigSpace::saved_mark_word() const {
return ContiguousSpace::saved_mark_word();
}
void G1OffsetTableContigSpace::set_saved_mark() {
void G1OffsetTableContigSpace::record_top_and_timestamp() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
unsigned curr_gc_time_stamp = g1h->get_gc_time_stamp();
......
......@@ -148,7 +148,7 @@ class G1OffsetTableContigSpace: public ContiguousSpace {
void set_end(HeapWord* value);
virtual HeapWord* saved_mark_word() const;
virtual void set_saved_mark();
void record_top_and_timestamp();
void reset_gc_time_stamp() { _gc_time_stamp = 0; }
unsigned get_gc_time_stamp() { return _gc_time_stamp; }
......@@ -202,10 +202,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
ContinuesHumongous
};
// Requires that the region "mr" be dense with objects, and begin and end
// with an object.
void oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl);
// The remembered set for this region.
// (Might want to make this "inline" later, to avoid some alloc failure
// issues.)
......@@ -569,9 +565,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
HeapWord* orig_end() { return _orig_end; }
// Allows logical separation between objects allocated before and after.
void save_marks();
// Reset HR stuff to default values.
void hr_clear(bool par, bool clear_space, bool locked = false);
void par_clear();
......@@ -580,10 +573,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
HeapWord* prev_top_at_mark_start() const { return _prev_top_at_mark_start; }
HeapWord* next_top_at_mark_start() const { return _next_top_at_mark_start; }
// Apply "cl->do_oop" to (the addresses of) all reference fields in objects
// allocated in the current region before the last call to "save_mark".
void oop_before_save_marks_iterate(ExtendedOopClosure* cl);
// Note the start or end of marking. This tells the heap region
// that the collector is about to start or has finished (concurrently)
// marking the heap.
......@@ -769,10 +758,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
_predicted_bytes_to_copy = bytes;
}
#define HeapRegion_OOP_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix) \
virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)
virtual CompactibleSpace* next_compaction_space() const;
virtual void reset_after_compaction();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册