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

Mon, 16 Mar 2009 10:52:44 -0400

author
tonyp
date
Mon, 16 Mar 2009 10:52:44 -0400
changeset 1073
2a5da27ccae9
parent 1072
25e146966e7c
child 1074
922c573ea67d

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

src/share/vm/gc_implementation/g1/g1RemSet.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1_globals.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Mon Mar 16 08:01:32 2009 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Mon Mar 16 10:52:44 2009 -0400
     1.3 @@ -502,14 +502,17 @@
     1.4    }
     1.5  
     1.6    if (ParallelGCThreads > 0) {
     1.7 -    // This is a temporary change to serialize the update and scanning
     1.8 -    // of remembered sets. There are some race conditions when this is
     1.9 -    // done in parallel and they are causing failures. When we resolve
    1.10 -    // said race conditions, we'll revert back to parallel remembered
    1.11 -    // set updating and scanning. See CRs 6677707 and 6677708.
    1.12 -    if (worker_i == 0) {
    1.13 +    // The two flags below were introduced temporarily to serialize
    1.14 +    // the updating and scanning of remembered sets. There are some
    1.15 +    // race conditions when these two operations are done in parallel
    1.16 +    // and they are causing failures. When we resolve said race
    1.17 +    // conditions, we'll revert back to parallel remembered set
    1.18 +    // updating and scanning. See CRs 6677707 and 6677708.
    1.19 +    if (G1EnableParallelRSetUpdating || (worker_i == 0)) {
    1.20        updateRS(worker_i);
    1.21        scanNewRefsRS(oc, worker_i);
    1.22 +    }
    1.23 +    if (G1EnableParallelRSetScanning || (worker_i == 0)) {
    1.24        scanRS(oc, worker_i);
    1.25      }
    1.26    } else {
     2.1 --- a/src/share/vm/gc_implementation/g1/g1_globals.hpp	Mon Mar 16 08:01:32 2009 -0700
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp	Mon Mar 16 10:52:44 2009 -0400
     2.3 @@ -295,6 +295,14 @@
     2.4                                                                              \
     2.5    product(uintx, G1FixedSurvivorSpaceSize, 0,                               \
     2.6            "If non-0 is the size of the G1 survivor space, "                 \
     2.7 -          "otherwise SurvivorRatio is used to determine the size")
     2.8 +          "otherwise SurvivorRatio is used to determine the size")          \
     2.9 +                                                                            \
    2.10 +  experimental(bool, G1EnableParallelRSetUpdating, false,                   \
    2.11 +          "Enables the parallelization of remembered set updating "         \
    2.12 +          "during evacuation pauses")                                       \
    2.13 +                                                                            \
    2.14 +  experimental(bool, G1EnableParallelRSetScanning, false,                   \
    2.15 +          "Enables the parallelization of remembered set scanning "         \
    2.16 +          "during evacuation pauses")
    2.17  
    2.18  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)

mercurial