提交 d57f2ccc 编写于 作者: T tonyp

6816154: G1: introduce flags to enable/disable RSet updating and scanning

Summary: Introduces two flags, -XX:-/+G1EnableParallelRSetUpdating and -XX:-/+G1EnableParallelRSetScanning, to turn on/off the "band aid" fix that serializes RSet updating / scanning during GCs.
Reviewed-by: iveresov
上级 7439228d
......@@ -502,14 +502,17 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
}
if (ParallelGCThreads > 0) {
// This is a temporary change to serialize the update and scanning
// of remembered sets. There are some race conditions when this is
// done in parallel and they are causing failures. When we resolve
// said race conditions, we'll revert back to parallel remembered
// set updating and scanning. See CRs 6677707 and 6677708.
if (worker_i == 0) {
// The two flags below were introduced temporarily to serialize
// the updating and scanning of remembered sets. There are some
// race conditions when these two operations are done in parallel
// and they are causing failures. When we resolve said race
// conditions, we'll revert back to parallel remembered set
// updating and scanning. See CRs 6677707 and 6677708.
if (G1EnableParallelRSetUpdating || (worker_i == 0)) {
updateRS(worker_i);
scanNewRefsRS(oc, worker_i);
}
if (G1EnableParallelRSetScanning || (worker_i == 0)) {
scanRS(oc, worker_i);
}
} else {
......
......@@ -295,6 +295,14 @@
\
product(uintx, G1FixedSurvivorSpaceSize, 0, \
"If non-0 is the size of the G1 survivor space, " \
"otherwise SurvivorRatio is used to determine the size")
"otherwise SurvivorRatio is used to determine the size") \
\
experimental(bool, G1EnableParallelRSetUpdating, false, \
"Enables the parallelization of remembered set updating " \
"during evacuation pauses") \
\
experimental(bool, G1EnableParallelRSetScanning, false, \
"Enables the parallelization of remembered set scanning " \
"during evacuation pauses")
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)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册