hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp
changeset 34296 ef50f39866b5
parent 34241 78486dc87f38
child 34302 c932a347d579
equal deleted inserted replaced
34286:ae53ecf4124a 34296:ef50f39866b5
  1516 
  1516 
  1517 protected:
  1517 protected:
  1518   size_t _max_heap_capacity;
  1518   size_t _max_heap_capacity;
  1519 };
  1519 };
  1520 
  1520 
       
  1521 class G1ParEvacuateFollowersClosure : public VoidClosure {
       
  1522 private:
       
  1523   double _start_term;
       
  1524   double _term_time;
       
  1525   size_t _term_attempts;
       
  1526 
       
  1527   void start_term_time() { _term_attempts++; _start_term = os::elapsedTime(); }
       
  1528   void end_term_time() { _term_time += os::elapsedTime() - _start_term; }
       
  1529 protected:
       
  1530   G1CollectedHeap*              _g1h;
       
  1531   G1ParScanThreadState*         _par_scan_state;
       
  1532   RefToScanQueueSet*            _queues;
       
  1533   ParallelTaskTerminator*       _terminator;
       
  1534 
       
  1535   G1ParScanThreadState*   par_scan_state() { return _par_scan_state; }
       
  1536   RefToScanQueueSet*      queues()         { return _queues; }
       
  1537   ParallelTaskTerminator* terminator()     { return _terminator; }
       
  1538 
       
  1539 public:
       
  1540   G1ParEvacuateFollowersClosure(G1CollectedHeap* g1h,
       
  1541                                 G1ParScanThreadState* par_scan_state,
       
  1542                                 RefToScanQueueSet* queues,
       
  1543                                 ParallelTaskTerminator* terminator)
       
  1544     : _g1h(g1h), _par_scan_state(par_scan_state),
       
  1545       _queues(queues), _terminator(terminator),
       
  1546       _start_term(0.0), _term_time(0.0), _term_attempts(0) {}
       
  1547 
       
  1548   void do_void();
       
  1549 
       
  1550   double term_time() const { return _term_time; }
       
  1551   size_t term_attempts() const { return _term_attempts; }
       
  1552 
       
  1553 private:
       
  1554   inline bool offer_termination();
       
  1555 };
       
  1556 
  1521 #endif // SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP
  1557 #endif // SHARE_VM_GC_G1_G1COLLECTEDHEAP_HPP