Mercurial > hg > truffle
changeset 3773:5130fa1b24f1
7045751: G1: +ExplicitGCInvokesConcurrent causes excessive single region evacuation pauses
Summary: When ExplicitGCInvokesConcurrent is enabled, do not perform an evacuation pause if a marking cycle is already in progress and block the requesting thread until the marking cycle completes.
Reviewed-by: tonyp, ysr
author | johnc |
---|---|
date | Wed, 15 Jun 2011 10:18:04 -0700 |
parents | 6747fd0512e0 |
children | c9ca3f51cf41 |
files | src/share/vm/gc_implementation/g1/vm_operations_g1.cpp |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Tue Jun 14 11:01:10 2011 -0700 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Wed Jun 15 10:18:04 2011 -0700 @@ -99,6 +99,18 @@ // At this point we are supposed to start a concurrent cycle. We // will do so if one is not already in progress. bool res = g1h->g1_policy()->force_initial_mark_if_outside_cycle(); + + // The above routine returns true if we were able to force the + // next GC pause to be an initial mark; it returns false if a + // marking cycle is already in progress. + // + // If a marking cycle is already in progress just return and skip + // the pause - the requesting thread should block in doit_epilogue + // until the marking cycle is complete. + if (!res) { + assert(_word_size == 0, "ExplicitGCInvokesConcurrent shouldn't be allocating"); + return; + } } _pause_succeeded =