aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/gc_implementation/g1/g1RemSet.cpp
diff options
context:
space:
mode:
authortonyp <none@none>2009-03-16 10:52:44 -0400
committertonyp <none@none>2009-03-16 10:52:44 -0400
commitb63c0ebe948c4a45fc45f1d761f21e6542f42a07 (patch)
tree6694db9a69eb5acc4e71cd34c1ac6cdd3704e9ba /src/share/vm/gc_implementation/g1/g1RemSet.cpp
parent744d78f726168d8afb61ba1754aaaec3fdf5d8c5 (diff)
downloadjdk8u_hotspot-b63c0ebe948c4a45fc45f1d761f21e6542f42a07.tar.gz
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
Diffstat (limited to 'src/share/vm/gc_implementation/g1/g1RemSet.cpp')
-rw-r--r--src/share/vm/gc_implementation/g1/g1RemSet.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/share/vm/gc_implementation/g1/g1RemSet.cpp b/src/share/vm/gc_implementation/g1/g1RemSet.cpp
index 6e36bda9c..b4f9791d5 100644
--- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp
+++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp
@@ -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 {