6816154: G1: introduce flags to enable/disable RSet updating and scanning
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
This commit is contained in:
parent
82619cc8da
commit
217739210d
@ -502,14 +502,17 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ParallelGCThreads > 0) {
|
if (ParallelGCThreads > 0) {
|
||||||
// This is a temporary change to serialize the update and scanning
|
// The two flags below were introduced temporarily to serialize
|
||||||
// of remembered sets. There are some race conditions when this is
|
// the updating and scanning of remembered sets. There are some
|
||||||
// done in parallel and they are causing failures. When we resolve
|
// race conditions when these two operations are done in parallel
|
||||||
// said race conditions, we'll revert back to parallel remembered
|
// and they are causing failures. When we resolve said race
|
||||||
// set updating and scanning. See CRs 6677707 and 6677708.
|
// conditions, we'll revert back to parallel remembered set
|
||||||
if (worker_i == 0) {
|
// updating and scanning. See CRs 6677707 and 6677708.
|
||||||
|
if (G1EnableParallelRSetUpdating || (worker_i == 0)) {
|
||||||
updateRS(worker_i);
|
updateRS(worker_i);
|
||||||
scanNewRefsRS(oc, worker_i);
|
scanNewRefsRS(oc, worker_i);
|
||||||
|
}
|
||||||
|
if (G1EnableParallelRSetScanning || (worker_i == 0)) {
|
||||||
scanRS(oc, worker_i);
|
scanRS(oc, worker_i);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -295,6 +295,14 @@
|
|||||||
\
|
\
|
||||||
product(uintx, G1FixedSurvivorSpaceSize, 0, \
|
product(uintx, G1FixedSurvivorSpaceSize, 0, \
|
||||||
"If non-0 is the size of the G1 survivor space, " \
|
"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)
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user