diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 10373:3a4805ad0005

8015244: G1: Verification after a full GC is incorrectly placed. Summary: In a full GC, move the verification after the GC to after RSet rebuilding. Verify RSet entries during a full GC under control of a flag. Reviewed-by: tschatzl, brutisso
author johnc
date Tue, 04 Jun 2013 10:04:06 -0700
parents e72f7eecc96d
children f2110083203d
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue May 28 09:32:06 2013 +0200
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Jun 04 10:04:06 2013 -0700
@@ -1417,8 +1417,6 @@
 
       MemoryService::track_memory_usage();
 
-      verify_after_gc();
-
       assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
       ref_processor_stw()->verify_no_references_recorded();
 
@@ -1521,6 +1519,8 @@
       _hrs.verify_optional();
       verify_region_sets_optional();
 
+      verify_after_gc();
+
       // Start a new incremental collection set for the next pause
       assert(g1_policy()->collection_set() == NULL, "must be");
       g1_policy()->start_incremental_cset_building();