mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8302709: Remove explicit remembered set verification in G1
Reviewed-by: ayang, iwalulya
This commit is contained in:
@@ -2546,16 +2546,6 @@ void G1CollectedHeap::verify_region_attr_remset_is_tracked() {
|
||||
}
|
||||
#endif
|
||||
|
||||
class VerifyRegionRemSetClosure : public HeapRegionClosure {
|
||||
public:
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
if (!hr->is_archive() && !hr->is_continues_humongous()) {
|
||||
hr->verify_rem_set();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void G1CollectedHeap::start_new_collection_set() {
|
||||
collection_set()->start_incremental_building();
|
||||
|
||||
@@ -2587,11 +2577,6 @@ void G1CollectedHeap::verify_before_young_collection(G1HeapVerifier::G1VerifyTyp
|
||||
_verifier->prepare_for_verify();
|
||||
_verifier->verify_region_sets_optional();
|
||||
_verifier->verify_dirty_young_regions();
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets before GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
_verifier->verify_before_gc(type);
|
||||
verify_numa_regions("GC Start");
|
||||
phase_times()->record_verify_before_time_ms((Ticks::now() - start).seconds() * MILLIUNITS);
|
||||
@@ -2602,11 +2587,6 @@ void G1CollectedHeap::verify_after_young_collection(G1HeapVerifier::G1VerifyType
|
||||
return;
|
||||
}
|
||||
Ticks start = Ticks::now();
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets after GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
_verifier->verify_after_gc(type);
|
||||
verify_numa_regions("GC End");
|
||||
_verifier->verify_region_sets_optional();
|
||||
|
||||
@@ -629,45 +629,6 @@ void HeapRegion::verify(VerifyOption vo,
|
||||
verify_code_roots(vo, failures);
|
||||
}
|
||||
|
||||
void HeapRegion::verify_rem_set(VerifyOption vo, bool* failures) const {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
*failures = false;
|
||||
HeapWord* p = bottom();
|
||||
HeapWord* prev_p = NULL;
|
||||
VerifyRemSetClosure vr_cl(g1h, vo);
|
||||
while (p < top()) {
|
||||
oop obj = cast_to_oop(p);
|
||||
size_t obj_size = block_size(p);
|
||||
|
||||
if (!g1h->is_obj_dead_cond(obj, this, vo)) {
|
||||
if (oopDesc::is_oop(obj)) {
|
||||
vr_cl.set_containing_obj(obj);
|
||||
obj->oop_iterate(&vr_cl);
|
||||
|
||||
if (vr_cl.has_failures()) {
|
||||
*failures = true;
|
||||
}
|
||||
if (vr_cl.num_failures() >= G1MaxVerifyFailures) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
log_error(gc, verify)(PTR_FORMAT " not an oop", p2i(obj));
|
||||
*failures = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
prev_p = p;
|
||||
p += obj_size;
|
||||
}
|
||||
}
|
||||
|
||||
void HeapRegion::verify_rem_set() const {
|
||||
bool failures = false;
|
||||
verify_rem_set(VerifyOption::G1UseConcMarking, &failures);
|
||||
guarantee(!failures, "HeapRegion RemSet verification failed");
|
||||
}
|
||||
|
||||
void HeapRegion::clear(bool mangle_space) {
|
||||
set_top(bottom());
|
||||
|
||||
|
||||
@@ -585,9 +585,6 @@ public:
|
||||
void print_on(outputStream* st) const;
|
||||
|
||||
void verify(VerifyOption vo, bool* failures) const;
|
||||
|
||||
void verify_rem_set(VerifyOption vo, bool* failures) const;
|
||||
void verify_rem_set() const;
|
||||
};
|
||||
|
||||
// HeapRegionClosure is used for iterating over regions.
|
||||
|
||||
Reference in New Issue
Block a user