United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6920090 G1: Disable ReduceInitialCardMarks at least until 6920109 is fixed
6920090 : G1: Disable ReduceInitialCardMarks at least until 6920109 is fixed

Details
Type:
Bug
Submit Date:
2010-01-26
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs16,hs17
Fixed Versions:
hs17

Related Reports
Backport:
Backport:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
This is a temporary measure to deal with observed lingering instability
with G1 when ReduceInitialCardMarks is enabled (the default today).
See comments section for email trail describing this and the test
case which exposes the issue.

                                    

Comments
EVALUATION

ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/34fb2662f6c2,ChangeRequest=6920090
                                     
2010-01-28
EVALUATION

ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/34fb2662f6c2,ChangeRequest=6920090
                                     
2010-01-27
WORK AROUND

-XX:-ReduceInitialCardMarks when using G1.
                                     
2010-01-26
EVALUATION

Yes.
                                     
2010-01-26
SUGGESTED FIX

diff -r c81fa70144aa src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp     Mon Jan 25 18:03:29 2010 -0500
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp     Tue Jan 26 01:28:23 2010 -0800
@@ -1004,7 +1004,11 @@ public:
   // storage in the heap comes from a young region or not.
   // See ReduceInitialCardMarks.
   virtual bool can_elide_tlab_store_barriers() const {
-    return true;
+    // Temporarily turned off, because of lingering
+    // instabilities related to RICM with G1. In the
+    // interim, the option ReduceInitialCardMarksForG1
+    // below is left solely as a debugging device.
+    return ReduceInitialCardMarksForG1;
   }

   virtual bool card_mark_must_follow_store() const {
@@ -1026,6 +1030,7 @@ public:
   // However, non-generational G1 (-XX:-G1Gen) appears to have
   // bit-rotted so was not tested below.
   virtual bool can_elide_initializing_store_barrier(oop new_obj) {
+    assert(ReduceInitialCardMarksForG1, "Else cannot be here");
     assert(G1Gen || !is_in_young(new_obj),
            "Non-generational G1 should never return true below");
     return is_in_young(new_obj);
diff -r c81fa70144aa src/share/vm/gc_implementation/g1/g1_globals.hpp
--- a/src/share/vm/gc_implementation/g1/g1_globals.hpp  Mon Jan 25 18:03:29 2010 -0500
+++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp  Tue Jan 26 01:28:23 2010 -0800
@@ -291,6 +291,10 @@
           "a particular entry exceeds this value.")                         \
                                                                             \
   develop(bool, G1VerifyCTCleanup, false,                                   \
-          "Verify card table cleanup.")
+          "Verify card table cleanup.")                                     \
+                                                                            \
+  develop(bool, ReduceInitialCardMarksForG1, false,                         \
+          "When ReduceInitialCardMarks is true, this flag setting "         \
+          " controls whether G1 allows the RICM optimization")

 G1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG)
                                     
2010-01-26



Hardware and Software, Engineered to Work Together