Skip to content

Commit 4c5d9cf

Browse files
author
Thomas Schatzl
committed
8303013: Always do remembered set verification during G1 Full GC
Reviewed-by: ayang, iwalulya
1 parent 2451c5a commit 4c5d9cf

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

src/hotspot/share/gc/g1/g1_globals.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,6 @@
280280
"as a percentage of the heap size.") \
281281
range(0, 100) \
282282
\
283-
product(bool, G1VerifyRSetsDuringFullGC, false, DIAGNOSTIC, \
284-
"If true, perform verification of each heap region's " \
285-
"remembered set when verifying the heap during a full GC.") \
286-
\
287283
product(bool, G1VerifyHeapRegionCodeRoots, false, DIAGNOSTIC, \
288284
"Verify the code root lists attached to each heap region.") \
289285
\

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure {
487487

488488
G1CollectedHeap* _g1h;
489489
VerifyOption _vo;
490-
bool _verify_remsets;
491490

492491
oop _containing_obj;
493492

@@ -591,16 +590,15 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure {
591590
oop obj = CompressedOops::decode_not_null(heap_oop);
592591

593592
bool is_live = verify_liveness(p, obj);
594-
if (is_live && _verify_remsets) {
593+
if (is_live) {
595594
verify_remset(p, obj);
596595
}
597596
}
598597

599598
public:
600-
G1VerifyLiveAndRemSetClosure(G1CollectedHeap* g1h, VerifyOption vo, bool verify_remsets) :
599+
G1VerifyLiveAndRemSetClosure(G1CollectedHeap* g1h, VerifyOption vo) :
601600
_g1h(G1CollectedHeap::heap()),
602601
_vo(vo),
603-
_verify_remsets(verify_remsets),
604602
_containing_obj(nullptr),
605603
_num_failures(0),
606604
_ct(_g1h->card_table()) { }
@@ -618,8 +616,7 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure {
618616
bool HeapRegion::verify_liveness_and_remset(VerifyOption vo) const {
619617
G1CollectedHeap* g1h = G1CollectedHeap::heap();
620618

621-
bool verify_rem_sets = !g1h->collector_state()->in_full_gc() || G1VerifyRSetsDuringFullGC;
622-
G1VerifyLiveAndRemSetClosure cl(g1h, vo, verify_rem_sets);
619+
G1VerifyLiveAndRemSetClosure cl(g1h, vo);
623620

624621
size_t other_failures = 0;
625622

test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* -Xbootclasspath/a:.
3636
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
3737
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
38-
* -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots
38+
* -XX:+G1VerifyHeapRegionCodeRoots
3939
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
4040
* -XX:+G1VerifyBitmaps
4141
* gc.g1.TestVerificationInConcurrentCycle
@@ -54,7 +54,7 @@
5454
* -Xbootclasspath/a:.
5555
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
5656
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
57-
* -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots
57+
* -XX:+G1VerifyHeapRegionCodeRoots
5858
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
5959
* gc.g1.TestVerificationInConcurrentCycle
6060
*/

0 commit comments

Comments
 (0)