1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Aug 23 10:21:12 2012 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Tue Aug 28 15:20:08 2012 -0700 1.3 @@ -915,6 +915,39 @@ 1.4 oop handle_evacuation_failure_par(OopsInHeapRegionClosure* cl, oop obj); 1.5 void handle_evacuation_failure_common(oop obj, markOop m); 1.6 1.7 +#ifndef PRODUCT 1.8 + // Support for forcing evacuation failures. Analogous to 1.9 + // PromotionFailureALot for the other collectors. 1.10 + 1.11 + // Records whether G1EvacuationFailureALot should be in effect 1.12 + // for the current GC 1.13 + bool _evacuation_failure_alot_for_current_gc; 1.14 + 1.15 + // Used to record the GC number for interval checking when 1.16 + // determining whether G1EvaucationFailureALot is in effect 1.17 + // for the current GC. 1.18 + size_t _evacuation_failure_alot_gc_number; 1.19 + 1.20 + // Count of the number of evacuations between failures. 1.21 + volatile size_t _evacuation_failure_alot_count; 1.22 + 1.23 + // Set whether G1EvacuationFailureALot should be in effect 1.24 + // for the current GC (based upon the type of GC and which 1.25 + // command line flags are set); 1.26 + inline bool evacuation_failure_alot_for_gc_type(bool gcs_are_young, 1.27 + bool during_initial_mark, 1.28 + bool during_marking); 1.29 + 1.30 + inline void set_evacuation_failure_alot_for_current_gc(); 1.31 + 1.32 + // Return true if it's time to cause an evacuation failure. 1.33 + inline bool evacuation_should_fail(); 1.34 + 1.35 + // Reset the G1EvacuationFailureALot counters. Should be called at 1.36 + // the end of an evacuation pause in which an evacuation failure ocurred. 1.37 + inline void reset_evacuation_should_fail(); 1.38 +#endif // !PRODUCT 1.39 + 1.40 // ("Weak") Reference processing support. 1.41 // 1.42 // G1 has 2 instances of the referece processor class. One