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


 525   bool                    concurrent()      { return _concurrent; }
 526   uint                    active_tasks()    { return _active_tasks; }
 527   ParallelTaskTerminator* terminator()      { return &_terminator; }
 528 
 529   // It claims the next available region to be scanned by a marking
 530   // task/thread. It might return NULL if the next region is empty or
 531   // we have run out of regions. In the latter case, out_of_regions()
 532   // determines whether we've really run out of regions or the task
 533   // should call claim_region() again. This might seem a bit
 534   // awkward. Originally, the code was written so that claim_region()
 535   // either successfully returned with a non-empty region or there
 536   // were no more regions to be claimed. The problem with this was
 537   // that, in certain circumstances, it iterated over large chunks of
 538   // the heap finding only empty regions and, while it was working, it
 539   // was preventing the calling task to call its regular clock
 540   // method. So, this way, each task will spend very little time in
 541   // claim_region() and is allowed to call the regular clock method
 542   // frequently.
 543   HeapRegion* claim_region(uint worker_id);
 544 
 545   // It determines whether we've run out of regions to scan
 546   bool        out_of_regions() { return _finger == _heap_end; }




 547 
 548   // Returns the task with the given id
 549   CMTask* task(int id) {
 550     assert(0 <= id && id < (int) _active_tasks,
 551            "task id not within active bounds");
 552     return _tasks[id];
 553   }
 554 
 555   // Returns the task queue with the given id
 556   CMTaskQueue* task_queue(int id) {
 557     assert(0 <= id && id < (int) _active_tasks,
 558            "task queue id not within active bounds");
 559     return (CMTaskQueue*) _task_queues->queue(id);
 560   }
 561 
 562   // Returns the task queue set
 563   CMTaskQueueSet* task_queues()  { return _task_queues; }
 564 
 565   // Access / manipulation of the overflow flag which is set to
 566   // indicate that the global stack has overflown




 525   bool                    concurrent()      { return _concurrent; }
 526   uint                    active_tasks()    { return _active_tasks; }
 527   ParallelTaskTerminator* terminator()      { return &_terminator; }
 528 
 529   // It claims the next available region to be scanned by a marking
 530   // task/thread. It might return NULL if the next region is empty or
 531   // we have run out of regions. In the latter case, out_of_regions()
 532   // determines whether we've really run out of regions or the task
 533   // should call claim_region() again. This might seem a bit
 534   // awkward. Originally, the code was written so that claim_region()
 535   // either successfully returned with a non-empty region or there
 536   // were no more regions to be claimed. The problem with this was
 537   // that, in certain circumstances, it iterated over large chunks of
 538   // the heap finding only empty regions and, while it was working, it
 539   // was preventing the calling task to call its regular clock
 540   // method. So, this way, each task will spend very little time in
 541   // claim_region() and is allowed to call the regular clock method
 542   // frequently.
 543   HeapRegion* claim_region(uint worker_id);
 544 
 545   // It determines whether we've run out of regions to scan. Note that
 546   // the finger can point past the heap end in case the heap was expanded
 547   // to satisfy an allocation without doing a GC. This is fine, because all
 548   // objects in those regions will be considered live anyway because of
 549   // SATB guarantees (i.e. their TAMS will be equal to bottom).
 550   bool        out_of_regions() { return _finger >= _heap_end; }
 551 
 552   // Returns the task with the given id
 553   CMTask* task(int id) {
 554     assert(0 <= id && id < (int) _active_tasks,
 555            "task id not within active bounds");
 556     return _tasks[id];
 557   }
 558 
 559   // Returns the task queue with the given id
 560   CMTaskQueue* task_queue(int id) {
 561     assert(0 <= id && id < (int) _active_tasks,
 562            "task queue id not within active bounds");
 563     return (CMTaskQueue*) _task_queues->queue(id);
 564   }
 565 
 566   // Returns the task queue set
 567   CMTaskQueueSet* task_queues()  { return _task_queues; }
 568 
 569   // Access / manipulation of the overflow flag which is set to
 570   // indicate that the global stack has overflown