diff --git a/src/hotspot/share/gc/g1/g1_globals.hpp b/src/hotspot/share/gc/g1/g1_globals.hpp index b3e0554411c..3d26a153bae 100644 --- a/src/hotspot/share/gc/g1/g1_globals.hpp +++ b/src/hotspot/share/gc/g1/g1_globals.hpp @@ -280,10 +280,6 @@ "as a percentage of the heap size.") \ range(0, 100) \ \ - product(bool, G1VerifyRSetsDuringFullGC, false, DIAGNOSTIC, \ - "If true, perform verification of each heap region's " \ - "remembered set when verifying the heap during a full GC.") \ - \ product(bool, G1VerifyHeapRegionCodeRoots, false, DIAGNOSTIC, \ "Verify the code root lists attached to each heap region.") \ \ diff --git a/src/hotspot/share/gc/g1/heapRegion.cpp b/src/hotspot/share/gc/g1/heapRegion.cpp index ccc91b94c90..9b980e49b7e 100644 --- a/src/hotspot/share/gc/g1/heapRegion.cpp +++ b/src/hotspot/share/gc/g1/heapRegion.cpp @@ -487,7 +487,6 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure { G1CollectedHeap* _g1h; VerifyOption _vo; - bool _verify_remsets; oop _containing_obj; @@ -591,16 +590,15 @@ class G1VerifyLiveAndRemSetClosure : public BasicOopIterateClosure { oop obj = CompressedOops::decode_not_null(heap_oop); bool is_live = verify_liveness(p, obj); - if (is_live && _verify_remsets) { + if (is_live) { verify_remset(p, obj); } } public: - G1VerifyLiveAndRemSetClosure(G1CollectedHeap* g1h, VerifyOption vo, bool verify_remsets) : + G1VerifyLiveAndRemSetClosure(G1CollectedHeap* g1h, VerifyOption vo) : _g1h(G1CollectedHeap::heap()), _vo(vo), - _verify_remsets(verify_remsets), _containing_obj(nullptr), _num_failures(0), _ct(_g1h->card_table()) { } @@ -618,8 +616,7 @@ public: bool HeapRegion::verify_liveness_and_remset(VerifyOption vo) const { G1CollectedHeap* g1h = G1CollectedHeap::heap(); - bool verify_rem_sets = !g1h->collector_state()->in_full_gc() || G1VerifyRSetsDuringFullGC; - G1VerifyLiveAndRemSetClosure cl(g1h, vo, verify_rem_sets); + G1VerifyLiveAndRemSetClosure cl(g1h, vo); size_t other_failures = 0; diff --git a/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java b/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java index af5538841e1..be4ffcc5c28 100644 --- a/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java +++ b/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java @@ -35,7 +35,7 @@ package gc.g1; * -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC - * -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots + * -XX:+G1VerifyHeapRegionCodeRoots * -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray * -XX:+G1VerifyBitmaps * gc.g1.TestVerificationInConcurrentCycle @@ -54,7 +54,7 @@ package gc.g1; * -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC - * -XX:+G1VerifyRSetsDuringFullGC -XX:+G1VerifyHeapRegionCodeRoots + * -XX:+G1VerifyHeapRegionCodeRoots * -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray * gc.g1.TestVerificationInConcurrentCycle */