comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 8733:9def4075da6d

8008079: G1: Add nextObject routine to CMBitMapRO and replace nextWord Summary: Update the task local finger to the start of the next object when marking aborts, in order to avoid the redundant scanning of all 0's when the marking task restarts, if otherwise updating to the next word. In addition, reuse the routine nextObject() in routine iterate(). Reviewed-by: johnc, ysr Contributed-by: tamao <tao.mao@oracle.com>
author tamao
date Tue, 05 Mar 2013 15:36:56 -0800
parents 5e401ef52ec0
children 15401203db6b
comparison
equal deleted inserted replaced
8682:d778bb46a9a5 8733:9def4075da6d
4109 // the object. It is easy to avoid this. We move the finger by 4109 // the object. It is easy to avoid this. We move the finger by
4110 // enough to point to the next possible object header (the 4110 // enough to point to the next possible object header (the
4111 // bitmap knows by how much we need to move it as it knows its 4111 // bitmap knows by how much we need to move it as it knows its
4112 // granularity). 4112 // granularity).
4113 assert(_finger < _region_limit, "invariant"); 4113 assert(_finger < _region_limit, "invariant");
4114 HeapWord* new_finger = _nextMarkBitMap->nextWord(_finger); 4114 HeapWord* new_finger = _nextMarkBitMap->nextObject(_finger);
4115 // Check if bitmap iteration was aborted while scanning the last object 4115 // Check if bitmap iteration was aborted while scanning the last object
4116 if (new_finger >= _region_limit) { 4116 if (new_finger >= _region_limit) {
4117 giveup_current_region(); 4117 giveup_current_region();
4118 } else { 4118 } else {
4119 move_finger_to(new_finger); 4119 move_finger_to(new_finger);