comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 638:2a5da27ccae9

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
author tonyp
date Mon, 16 Mar 2009 10:52:44 -0400
parents 25e146966e7c
children ba50942c8138
comparison
equal deleted inserted replaced
637:25e146966e7c 638:2a5da27ccae9
500 count_cl.mx(), count_cl.mxr()); 500 count_cl.mx(), count_cl.mxr());
501 count_cl.print_histo(); 501 count_cl.print_histo();
502 } 502 }
503 503
504 if (ParallelGCThreads > 0) { 504 if (ParallelGCThreads > 0) {
505 // This is a temporary change to serialize the update and scanning 505 // The two flags below were introduced temporarily to serialize
506 // of remembered sets. There are some race conditions when this is 506 // the updating and scanning of remembered sets. There are some
507 // done in parallel and they are causing failures. When we resolve 507 // race conditions when these two operations are done in parallel
508 // said race conditions, we'll revert back to parallel remembered 508 // and they are causing failures. When we resolve said race
509 // set updating and scanning. See CRs 6677707 and 6677708. 509 // conditions, we'll revert back to parallel remembered set
510 if (worker_i == 0) { 510 // updating and scanning. See CRs 6677707 and 6677708.
511 if (G1EnableParallelRSetUpdating || (worker_i == 0)) {
511 updateRS(worker_i); 512 updateRS(worker_i);
512 scanNewRefsRS(oc, worker_i); 513 scanNewRefsRS(oc, worker_i);
514 }
515 if (G1EnableParallelRSetScanning || (worker_i == 0)) {
513 scanRS(oc, worker_i); 516 scanRS(oc, worker_i);
514 } 517 }
515 } else { 518 } else {
516 assert(worker_i == 0, "invariant"); 519 assert(worker_i == 0, "invariant");
517 updateRS(0); 520 updateRS(0);