提交 c6dbb04f 编写于 作者: Y ysr

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
上级 c974d229
......@@ -1004,7 +1004,12 @@ public:
// 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 @@ 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) {
// 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);
......
......@@ -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)
......@@ -66,7 +66,8 @@ void CollectedHeap::pre_initialize() {
// 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册