mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
6988458: G1: assert(mr.end() <= _cm->finger()) failed: otherwise the region shouldn't be on the stack
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
This commit is contained in:
parent
0c9bfb6003
commit
f6acb9efb0
1 changed files with 3 additions and 2 deletions
|
@ -2418,6 +2418,8 @@ void ConcurrentMark::clear_marking_state() {
|
|||
for (int i = 0; i < (int)_max_task_num; ++i) {
|
||||
OopTaskQueue* queue = _task_queues->queue(i);
|
||||
queue->set_empty();
|
||||
// Clear any partial regions from the CMTasks
|
||||
_tasks[i]->clear_aborted_region();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2706,7 +2708,6 @@ void ConcurrentMark::abort() {
|
|||
clear_marking_state();
|
||||
for (int i = 0; i < (int)_max_task_num; ++i) {
|
||||
_tasks[i]->clear_region_fields();
|
||||
_tasks[i]->clear_aborted_region();
|
||||
}
|
||||
_has_aborted = true;
|
||||
|
||||
|
@ -2985,7 +2986,7 @@ void CMTask::reset(CMBitMap* nextMarkBitMap) {
|
|||
|
||||
_nextMarkBitMap = nextMarkBitMap;
|
||||
clear_region_fields();
|
||||
clear_aborted_region();
|
||||
assert(_aborted_region.is_empty(), "should have been cleared");
|
||||
|
||||
_calls = 0;
|
||||
_elapsed_time_ms = 0.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue