src/share/vm/gc_implementation/g1/concurrentMark.hpp
Print this page
rev 6346 : 8040804: G1: Concurrent mark stuck in loop calling os::elapsedVTime()
Reviewed-by: TBD
@@ -540,12 +540,16 @@
// method. So, this way, each task will spend very little time in
// claim_region() and is allowed to call the regular clock method
// frequently.
HeapRegion* claim_region(uint worker_id);
- // It determines whether we've run out of regions to scan
- bool out_of_regions() { return _finger == _heap_end; }
+ // It determines whether we've run out of regions to scan. Note that
+ // the finger can point past the heap end in case the heap was expanded
+ // to satisfy an allocation without doing a GC. This is fine, because all
+ // objects in those regions will be considered live anyway because of
+ // SATB guarantees (i.e. their TAMS will be equal to bottom).
+ bool out_of_regions() { return _finger >= _heap_end; }
// Returns the task with the given id
CMTask* task(int id) {
assert(0 <= id && id < (int) _active_tasks,
"task id not within active bounds");