--- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp 2014-10-29 15:08:30.589593520 -0700 +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp 2014-10-29 15:08:30.537592709 -0700 @@ -1117,6 +1117,10 @@ // will collect this generation (at least). double _initiating_occupancy; + // Set to 1, if another GC thread already had a promotion failure. + // This is boolean, but used juint type to call OrderAccess. + juint _has_promotion_failed; + protected: // Shrink generation by specified size (returns false if unable to shrink) void shrink_free_list_by(size_t bytes); @@ -1132,6 +1136,11 @@ double initiating_occupancy() const { return _initiating_occupancy; } void init_initiating_occupancy(intx io, uintx tr); + // Support for CMSFastPromotionFailure + bool has_promotion_failed() { return OrderAccess::load_acquire(&_has_promotion_failed) != 0; } + bool set_promotion_failed() { OrderAccess::release_store(&_has_promotion_failed, 1); } + bool reset_promotion_failed() { OrderAccess::release_store(&_has_promotion_failed, 0); } + public: ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size, int level, CardTableRS* ct,