Mercurial > hg > truffle
changeset 1194:34fb2662f6c2
6920090: G1: Disable ReduceInitialCardMarks at least until 6920109 is fixed
Summary: G1 now answers "no" to the query can_elide_initializing_store_barrier() in the product build. A debug flag allows alternate behaviour in debug builds.
Reviewed-by: iveresov, tonyp
author | ysr |
---|---|
date | Tue, 26 Jan 2010 16:52:29 -0800 |
parents | c81fa70144aa |
children | 291c9b3b64fc |
files | src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp src/share/vm/gc_implementation/g1/g1_globals.hpp src/share/vm/gc_interface/collectedHeap.cpp |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 16:52:29 2010 -0800 @@ -1004,7 +1004,12 @@ // storage in the heap comes from a young region or not. // See ReduceInitialCardMarks. virtual bool can_elide_tlab_store_barriers() const { - return true; + // 6920090: Temporarily disabled, because of lingering + // instabilities related to RICM with G1. In the + // interim, the option ReduceInitialCardMarksForG1 + // below is left solely as a debugging device at least + // until 6920109 fixes the instabilities. + return ReduceInitialCardMarksForG1; } virtual bool card_mark_must_follow_store() const { @@ -1026,6 +1031,8 @@ // 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) { + // Re 6920090, 6920109 above. + 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);
--- 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 16:52:29 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)
--- a/src/share/vm/gc_interface/collectedHeap.cpp Mon Jan 25 18:03:29 2010 -0500 +++ b/src/share/vm/gc_interface/collectedHeap.cpp Tue Jan 26 16:52:29 2010 -0800 @@ -66,7 +66,8 @@ // Used for ReduceInitialCardMarks (when COMPILER2 is used); // otherwise remains unused. #ifdef COMPLER2 - _defer_initial_card_mark = ReduceInitialCardMarks && (DeferInitialCardMark || card_mark_must_follow_store()); + _defer_initial_card_mark = ReduceInitialCardMarks && can_elide_tlab_store_barriers() + && (DeferInitialCardMark || card_mark_must_follow_store()); #else assert(_defer_initial_card_mark == false, "Who would set it?"); #endif