# HG changeset patch # User ysr # Date 1213304555 25200 # Node ID 6da60b69f90c30f16384241894ca5bd9069d0b8f # Parent f7fc7a708b636e09e39dfcee67520da9eb4c98a6# Parent 60436e77fafa7f418ba575089a1147182da577cc Merge diff -r f7fc7a708b63 -r 6da60b69f90c hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu Jun 12 13:50:55 2008 -0700 +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu Jun 12 14:02:35 2008 -0700 @@ -3751,8 +3751,10 @@ if (!has_aborted()) { // We cannot check whether the global stack is empty, since other - // tasks might be pushing objects to it concurrently. - tmp_guarantee_CM( _cm->out_of_regions() && _cm->region_stack_empty(), + // tasks might be pushing objects to it concurrently. We also cannot + // check if the region stack is empty because if a thread is aborting + // it can push a partially done region back. + tmp_guarantee_CM( _cm->out_of_regions(), "at this point we should be out of regions" ); if (_cm->verbose_low()) @@ -3774,9 +3776,10 @@ // we could. Let's try to do some stealing... // We cannot check whether the global stack is empty, since other - // tasks might be pushing objects to it concurrently. + // tasks might be pushing objects to it concurrently. We also cannot + // check if the region stack is empty because if a thread is aborting + // it can push a partially done region back. guarantee( _cm->out_of_regions() && - _cm->region_stack_empty() && _task_queue->size() == 0, "only way to reach here" ); if (_cm->verbose_low()) @@ -3811,9 +3814,10 @@ // termination protocol. if (!has_aborted()) { // We cannot check whether the global stack is empty, since other - // tasks might be concurrently pushing objects on it. + // tasks might be concurrently pushing objects on it. We also cannot + // check if the region stack is empty because if a thread is aborting + // it can push a partially done region back. guarantee( _cm->out_of_regions() && - _cm->region_stack_empty() && _task_queue->size() == 0, "only way to reach here" ); if (_cm->verbose_low())