< prev index next >

src/share/vm/gc_implementation/g1/concurrentMark.hpp

Print this page




 661 
 662   void update_accum_task_vtime(int i, double vtime) {
 663     _accum_task_vtime[i] += vtime;
 664   }
 665 
 666   double all_task_accum_vtime() {
 667     double ret = 0.0;
 668     for (uint i = 0; i < _max_worker_id; ++i)
 669       ret += _accum_task_vtime[i];
 670     return ret;
 671   }
 672 
 673   // Attempts to steal an object from the task queues of other tasks
 674   bool try_stealing(uint worker_id, int* hash_seed, oop& obj) {
 675     return _task_queues->steal(worker_id, hash_seed, obj);
 676   }
 677 
 678   ConcurrentMark(G1CollectedHeap* g1h,
 679                  G1RegionToSpaceMapper* prev_bitmap_storage,
 680                  G1RegionToSpaceMapper* next_bitmap_storage);



 681   ~ConcurrentMark();
 682 

 683   ConcurrentMarkThread* cmThread() { return _cmThread; }
 684 
 685   CMBitMapRO* prevMarkBitMap() const { return _prevMarkBitMap; }
 686   CMBitMap*   nextMarkBitMap() const { return _nextMarkBitMap; }
 687 
 688   // Returns the number of GC threads to be used in a concurrent
 689   // phase based on the number of GC threads being used in a STW
 690   // phase.
 691   uint scale_parallel_threads(uint n_par_threads);
 692 
 693   // Calculates the number of GC threads to be used in a concurrent phase.
 694   uint calc_parallel_marking_threads();
 695 
 696   // The following three are interaction between CM and
 697   // G1CollectedHeap
 698 
 699   // This notifies CM that a root during initial-mark needs to be
 700   // grayed. It is MT-safe. word_size is the size of the object in
 701   // words. It is passed explicitly as sometimes we cannot calculate
 702   // it from the given object because it might be in an inconsistent




 661 
 662   void update_accum_task_vtime(int i, double vtime) {
 663     _accum_task_vtime[i] += vtime;
 664   }
 665 
 666   double all_task_accum_vtime() {
 667     double ret = 0.0;
 668     for (uint i = 0; i < _max_worker_id; ++i)
 669       ret += _accum_task_vtime[i];
 670     return ret;
 671   }
 672 
 673   // Attempts to steal an object from the task queues of other tasks
 674   bool try_stealing(uint worker_id, int* hash_seed, oop& obj) {
 675     return _task_queues->steal(worker_id, hash_seed, obj);
 676   }
 677 
 678   ConcurrentMark(G1CollectedHeap* g1h,
 679                  G1RegionToSpaceMapper* prev_bitmap_storage,
 680                  G1RegionToSpaceMapper* next_bitmap_storage);
 681 
 682  private:
 683   // The ConcurrentMark instance is never freed.
 684   ~ConcurrentMark();
 685 
 686  public:
 687   ConcurrentMarkThread* cmThread() { return _cmThread; }
 688 
 689   CMBitMapRO* prevMarkBitMap() const { return _prevMarkBitMap; }
 690   CMBitMap*   nextMarkBitMap() const { return _nextMarkBitMap; }
 691 
 692   // Returns the number of GC threads to be used in a concurrent
 693   // phase based on the number of GC threads being used in a STW
 694   // phase.
 695   uint scale_parallel_threads(uint n_par_threads);
 696 
 697   // Calculates the number of GC threads to be used in a concurrent phase.
 698   uint calc_parallel_marking_threads();
 699 
 700   // The following three are interaction between CM and
 701   // G1CollectedHeap
 702 
 703   // This notifies CM that a root during initial-mark needs to be
 704   // grayed. It is MT-safe. word_size is the size of the object in
 705   // words. It is passed explicitly as sometimes we cannot calculate
 706   // it from the given object because it might be in an inconsistent


< prev index next >