< prev index next >

src/share/vm/gc/shared/collectedHeap.hpp

Print this page
rev 13053 : 8180932: Parallelize safepoint cleanup
Summary: Provide infrastructure to do safepoint cleanup tasks using parallel worker threads
Reviewed-by: dholmes, rehn


 587   // Return a NULL terminated array of concurrent phase names provided
 588   // by this collector.  Supports Whitebox testing.  These are the
 589   // names recognized by request_concurrent_phase(). The default
 590   // implementation returns an array of one NULL element.
 591   virtual const char* const* concurrent_phases() const;
 592 
 593   // Request the collector enter the indicated concurrent phase, and
 594   // wait until it does so.  Supports WhiteBox testing.  Only one
 595   // request may be active at a time.  Phases are designated by name;
 596   // the set of names and their meaning is GC-specific.  Once the
 597   // requested phase has been reached, the collector will attempt to
 598   // avoid transitioning to a new phase until a new request is made.
 599   // [Note: A collector might not be able to remain in a given phase.
 600   // For example, a full collection might cancel an in-progress
 601   // concurrent collection.]
 602   //
 603   // Returns true when the phase is reached.  Returns false for an
 604   // unknown phase.  The default implementation returns false.
 605   virtual bool request_concurrent_phase(const char* phase);
 606 










 607   // Non product verification and debugging.
 608 #ifndef PRODUCT
 609   // Support for PromotionFailureALot.  Return true if it's time to cause a
 610   // promotion failure.  The no-argument version uses
 611   // this->_promotion_failure_alot_count as the counter.
 612   inline bool promotion_should_fail(volatile size_t* count);
 613   inline bool promotion_should_fail();
 614 
 615   // Reset the PromotionFailureALot counters.  Should be called at the end of a
 616   // GC in which promotion failure occurred.
 617   inline void reset_promotion_should_fail(volatile size_t* count);
 618   inline void reset_promotion_should_fail();
 619 #endif  // #ifndef PRODUCT
 620 
 621 #ifdef ASSERT
 622   static int fired_fake_oom() {
 623     return (CIFireOOMAt > 1 && _fire_out_of_memory_count >= CIFireOOMAt);
 624   }
 625 #endif
 626 




 587   // Return a NULL terminated array of concurrent phase names provided
 588   // by this collector.  Supports Whitebox testing.  These are the
 589   // names recognized by request_concurrent_phase(). The default
 590   // implementation returns an array of one NULL element.
 591   virtual const char* const* concurrent_phases() const;
 592 
 593   // Request the collector enter the indicated concurrent phase, and
 594   // wait until it does so.  Supports WhiteBox testing.  Only one
 595   // request may be active at a time.  Phases are designated by name;
 596   // the set of names and their meaning is GC-specific.  Once the
 597   // requested phase has been reached, the collector will attempt to
 598   // avoid transitioning to a new phase until a new request is made.
 599   // [Note: A collector might not be able to remain in a given phase.
 600   // For example, a full collection might cancel an in-progress
 601   // concurrent collection.]
 602   //
 603   // Returns true when the phase is reached.  Returns false for an
 604   // unknown phase.  The default implementation returns false.
 605   virtual bool request_concurrent_phase(const char* phase);
 606 
 607   // Provides a thread pool to SafepointSynchronize to use
 608   // for parallel safepoint cleanup.
 609   // GCs that use a GC worker thread pool may want to share
 610   // it for use during safepoint cleanup. This is only possible
 611   // if the GC can pause and resume concurrent work (e.g. G1
 612   // concurrent marking) for an intermittent non-GC safepoint.
 613   // If this method returns NULL, SafepointSynchronize will
 614   // perform cleanup tasks serially in the VMThread.
 615   virtual WorkGang* get_safepoint_workers() { return NULL; }
 616 
 617   // Non product verification and debugging.
 618 #ifndef PRODUCT
 619   // Support for PromotionFailureALot.  Return true if it's time to cause a
 620   // promotion failure.  The no-argument version uses
 621   // this->_promotion_failure_alot_count as the counter.
 622   inline bool promotion_should_fail(volatile size_t* count);
 623   inline bool promotion_should_fail();
 624 
 625   // Reset the PromotionFailureALot counters.  Should be called at the end of a
 626   // GC in which promotion failure occurred.
 627   inline void reset_promotion_should_fail(volatile size_t* count);
 628   inline void reset_promotion_should_fail();
 629 #endif  // #ifndef PRODUCT
 630 
 631 #ifdef ASSERT
 632   static int fired_fake_oom() {
 633     return (CIFireOOMAt > 1 && _fire_out_of_memory_count >= CIFireOOMAt);
 634   }
 635 #endif
 636 


< prev index next >