8142749: HeapRegion::_predicted_bytes_to_copy is unused and can be removed
Reviewed-by: tschatzl, drwhite
This commit is contained in:
parent
5a2d8cb819
commit
9d95a1541b
@ -216,14 +216,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool doHeapRegion(HeapRegion *hr) {
|
bool doHeapRegion(HeapRegion *hr) {
|
||||||
bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
|
|
||||||
bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
|
|
||||||
|
|
||||||
assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
|
assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
|
||||||
assert(hr->in_collection_set(), "bad CS");
|
assert(hr->in_collection_set(), "bad CS");
|
||||||
|
|
||||||
if (_hrclaimer->claim_region(hr->hrm_index())) {
|
if (_hrclaimer->claim_region(hr->hrm_index())) {
|
||||||
if (hr->evacuation_failed()) {
|
if (hr->evacuation_failed()) {
|
||||||
|
bool during_initial_mark = _g1h->collector_state()->during_initial_mark_pause();
|
||||||
|
bool during_conc_mark = _g1h->collector_state()->mark_in_progress();
|
||||||
|
|
||||||
hr->note_self_forwarding_removal_start(during_initial_mark,
|
hr->note_self_forwarding_removal_start(during_initial_mark,
|
||||||
during_conc_mark);
|
during_conc_mark);
|
||||||
_g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
|
_g1h->verifier()->check_bitmaps("Self-Forwarding Ptr Removal", hr);
|
||||||
@ -234,9 +234,7 @@ public:
|
|||||||
|
|
||||||
hr->rem_set()->clean_strong_code_roots(hr);
|
hr->rem_set()->clean_strong_code_roots(hr);
|
||||||
|
|
||||||
hr->note_self_forwarding_removal_end(during_initial_mark,
|
hr->note_self_forwarding_removal_end(live_bytes);
|
||||||
during_conc_mark,
|
|
||||||
live_bytes);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -290,8 +290,7 @@ HeapRegion::HeapRegion(uint hrm_index,
|
|||||||
_containing_set(NULL),
|
_containing_set(NULL),
|
||||||
#endif // ASSERT
|
#endif // ASSERT
|
||||||
_young_index_in_cset(-1), _surv_rate_group(NULL), _age_index(-1),
|
_young_index_in_cset(-1), _surv_rate_group(NULL), _age_index(-1),
|
||||||
_rem_set(NULL), _recorded_rs_length(0), _predicted_elapsed_time_ms(0),
|
_rem_set(NULL), _recorded_rs_length(0), _predicted_elapsed_time_ms(0)
|
||||||
_predicted_bytes_to_copy(0)
|
|
||||||
{
|
{
|
||||||
_rem_set = new HeapRegionRemSet(bot, this);
|
_rem_set = new HeapRegionRemSet(bot, this);
|
||||||
|
|
||||||
@ -343,9 +342,7 @@ void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeapRegion::note_self_forwarding_removal_end(bool during_initial_mark,
|
void HeapRegion::note_self_forwarding_removal_end(size_t marked_bytes) {
|
||||||
bool during_conc_mark,
|
|
||||||
size_t marked_bytes) {
|
|
||||||
assert(marked_bytes <= used(),
|
assert(marked_bytes <= used(),
|
||||||
"marked: " SIZE_FORMAT " used: " SIZE_FORMAT, marked_bytes, used());
|
"marked: " SIZE_FORMAT " used: " SIZE_FORMAT, marked_bytes, used());
|
||||||
_prev_top_at_mark_start = top();
|
_prev_top_at_mark_start = top();
|
||||||
@ -483,7 +480,6 @@ void HeapRegion::strong_code_roots_do(CodeBlobClosure* blk) const {
|
|||||||
|
|
||||||
class VerifyStrongCodeRootOopClosure: public OopClosure {
|
class VerifyStrongCodeRootOopClosure: public OopClosure {
|
||||||
const HeapRegion* _hr;
|
const HeapRegion* _hr;
|
||||||
nmethod* _nm;
|
|
||||||
bool _failures;
|
bool _failures;
|
||||||
bool _has_oops_in_region;
|
bool _has_oops_in_region;
|
||||||
|
|
||||||
@ -510,7 +506,7 @@ class VerifyStrongCodeRootOopClosure: public OopClosure {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VerifyStrongCodeRootOopClosure(const HeapRegion* hr, nmethod* nm):
|
VerifyStrongCodeRootOopClosure(const HeapRegion* hr):
|
||||||
_hr(hr), _failures(false), _has_oops_in_region(false) {}
|
_hr(hr), _failures(false), _has_oops_in_region(false) {}
|
||||||
|
|
||||||
void do_oop(narrowOop* p) { do_oop_work(p); }
|
void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||||
@ -536,7 +532,7 @@ public:
|
|||||||
p2i(_hr->bottom()), p2i(_hr->end()), p2i(nm));
|
p2i(_hr->bottom()), p2i(_hr->end()), p2i(nm));
|
||||||
_failures = true;
|
_failures = true;
|
||||||
} else {
|
} else {
|
||||||
VerifyStrongCodeRootOopClosure oop_cl(_hr, nm);
|
VerifyStrongCodeRootOopClosure oop_cl(_hr);
|
||||||
nm->oops_do(&oop_cl);
|
nm->oops_do(&oop_cl);
|
||||||
if (!oop_cl.has_oops_in_region()) {
|
if (!oop_cl.has_oops_in_region()) {
|
||||||
log_error(gc, verify)("region [" PTR_FORMAT "," PTR_FORMAT "] has nmethod " PTR_FORMAT " in its strong code roots with no pointers into region",
|
log_error(gc, verify)("region [" PTR_FORMAT "," PTR_FORMAT "] has nmethod " PTR_FORMAT " in its strong code roots with no pointers into region",
|
||||||
@ -728,7 +724,6 @@ public:
|
|||||||
Log(gc, verify) log;
|
Log(gc, verify) log;
|
||||||
if (!oopDesc::is_null(heap_oop)) {
|
if (!oopDesc::is_null(heap_oop)) {
|
||||||
oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
|
oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
|
||||||
bool failed = false;
|
|
||||||
HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p);
|
HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p);
|
||||||
HeapRegion* to = _g1h->heap_region_containing(obj);
|
HeapRegion* to = _g1h->heap_region_containing(obj);
|
||||||
if (from != NULL && to != NULL &&
|
if (from != NULL && to != NULL &&
|
||||||
@ -763,7 +758,7 @@ public:
|
|||||||
log.error("Obj head CTE = %d, field CTE = %d.", cv_obj, cv_field);
|
log.error("Obj head CTE = %d, field CTE = %d.", cv_obj, cv_field);
|
||||||
log.error("----------");
|
log.error("----------");
|
||||||
_failures = true;
|
_failures = true;
|
||||||
if (!failed) _n_failures++;
|
_n_failures++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,10 +311,6 @@ class HeapRegion: public G1ContiguousSpace {
|
|||||||
// for the collection set.
|
// for the collection set.
|
||||||
double _predicted_elapsed_time_ms;
|
double _predicted_elapsed_time_ms;
|
||||||
|
|
||||||
// The predicted number of bytes to copy that was added to
|
|
||||||
// the total value for the collection set.
|
|
||||||
size_t _predicted_bytes_to_copy;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HeapRegion(uint hrm_index,
|
HeapRegion(uint hrm_index,
|
||||||
G1BlockOffsetTable* bot,
|
G1BlockOffsetTable* bot,
|
||||||
@ -554,9 +550,7 @@ class HeapRegion: public G1ContiguousSpace {
|
|||||||
|
|
||||||
// Notify the region that we have finished processing self-forwarded
|
// Notify the region that we have finished processing self-forwarded
|
||||||
// objects during evac failure handling.
|
// objects during evac failure handling.
|
||||||
void note_self_forwarding_removal_end(bool during_initial_mark,
|
void note_self_forwarding_removal_end(size_t marked_bytes);
|
||||||
bool during_conc_mark,
|
|
||||||
size_t marked_bytes);
|
|
||||||
|
|
||||||
// Returns "false" iff no object in the region was allocated when the
|
// Returns "false" iff no object in the region was allocated when the
|
||||||
// last mark phase ended.
|
// last mark phase ended.
|
||||||
@ -671,7 +665,6 @@ class HeapRegion: public G1ContiguousSpace {
|
|||||||
|
|
||||||
size_t recorded_rs_length() const { return _recorded_rs_length; }
|
size_t recorded_rs_length() const { return _recorded_rs_length; }
|
||||||
double predicted_elapsed_time_ms() const { return _predicted_elapsed_time_ms; }
|
double predicted_elapsed_time_ms() const { return _predicted_elapsed_time_ms; }
|
||||||
size_t predicted_bytes_to_copy() const { return _predicted_bytes_to_copy; }
|
|
||||||
|
|
||||||
void set_recorded_rs_length(size_t rs_length) {
|
void set_recorded_rs_length(size_t rs_length) {
|
||||||
_recorded_rs_length = rs_length;
|
_recorded_rs_length = rs_length;
|
||||||
@ -681,10 +674,6 @@ class HeapRegion: public G1ContiguousSpace {
|
|||||||
_predicted_elapsed_time_ms = ms;
|
_predicted_elapsed_time_ms = ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_predicted_bytes_to_copy(size_t bytes) {
|
|
||||||
_predicted_bytes_to_copy = bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual CompactibleSpace* next_compaction_space() const;
|
virtual CompactibleSpace* next_compaction_space() const;
|
||||||
|
|
||||||
virtual void reset_after_compaction();
|
virtual void reset_after_compaction();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user