6988458: G1: assert(mr.end() <= _cm->finger()) failed: otherwise the region shouldn't be on the stack

Mon, 18 Oct 2010 15:01:41 -0700

author
johnc
date
Mon, 18 Oct 2010 15:01:41 -0700
changeset 2240
a5c514e74487
parent 2239
9f4848ebbabd
child 2241
72a161e62cc4

6988458: G1: assert(mr.end() <= _cm->finger()) failed: otherwise the region shouldn't be on the stack
Summary: The changes from 6941395 did not clear the CMTask::_aborted_region fields when concurrent marking aborted because of overflow. As a result, the next time around we could see a memory region whose start address was above the global finger and the assertion tripped. Moved the clearing of the aborted regions to ConcurrentMark::clear_marking_state, which is executed on all of the exit paths.
Reviewed-by: tonyp, ysr, jmasa

src/share/vm/gc_implementation/g1/concurrentMark.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Oct 15 17:26:56 2010 -0400
     1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Oct 18 15:01:41 2010 -0700
     1.3 @@ -2418,6 +2418,8 @@
     1.4    for (int i = 0; i < (int)_max_task_num; ++i) {
     1.5      OopTaskQueue* queue = _task_queues->queue(i);
     1.6      queue->set_empty();
     1.7 +    // Clear any partial regions from the CMTasks
     1.8 +    _tasks[i]->clear_aborted_region();
     1.9    }
    1.10  }
    1.11  
    1.12 @@ -2706,7 +2708,6 @@
    1.13    clear_marking_state();
    1.14    for (int i = 0; i < (int)_max_task_num; ++i) {
    1.15      _tasks[i]->clear_region_fields();
    1.16 -    _tasks[i]->clear_aborted_region();
    1.17    }
    1.18    _has_aborted = true;
    1.19  
    1.20 @@ -2985,7 +2986,7 @@
    1.21  
    1.22    _nextMarkBitMap                = nextMarkBitMap;
    1.23    clear_region_fields();
    1.24 -  clear_aborted_region();
    1.25 +  assert(_aborted_region.is_empty(), "should have been cleared");
    1.26  
    1.27    _calls                         = 0;
    1.28    _elapsed_time_ms               = 0.0;

mercurial