comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 6629:c9814fadeb38

7041879: G1: introduce stress testing parameter to cause frequent evacuation failures Summary: Add the flags G1EvacuationFailureALot flag (and supporting flags) to force trigger evacuation failures. The support flags control how often to trigger an evacuation failure and during which types of evacuation pause. This functionality is analogous to that of PromotionFailureALot for the other collectors. Reviewed-by: brutisso
author johnc
date Tue, 28 Aug 2012 15:20:08 -0700
parents bb3f6194fedb
children da91efe96a93
comparison
equal deleted inserted replaced
6628:bb3f6194fedb 6629:c9814fadeb38
912 void finalize_for_evac_failure(); 912 void finalize_for_evac_failure();
913 913
914 // An attempt to evacuate "obj" has failed; take necessary steps. 914 // An attempt to evacuate "obj" has failed; take necessary steps.
915 oop handle_evacuation_failure_par(OopsInHeapRegionClosure* cl, oop obj); 915 oop handle_evacuation_failure_par(OopsInHeapRegionClosure* cl, oop obj);
916 void handle_evacuation_failure_common(oop obj, markOop m); 916 void handle_evacuation_failure_common(oop obj, markOop m);
917
918 #ifndef PRODUCT
919 // Support for forcing evacuation failures. Analogous to
920 // PromotionFailureALot for the other collectors.
921
922 // Records whether G1EvacuationFailureALot should be in effect
923 // for the current GC
924 bool _evacuation_failure_alot_for_current_gc;
925
926 // Used to record the GC number for interval checking when
927 // determining whether G1EvaucationFailureALot is in effect
928 // for the current GC.
929 size_t _evacuation_failure_alot_gc_number;
930
931 // Count of the number of evacuations between failures.
932 volatile size_t _evacuation_failure_alot_count;
933
934 // Set whether G1EvacuationFailureALot should be in effect
935 // for the current GC (based upon the type of GC and which
936 // command line flags are set);
937 inline bool evacuation_failure_alot_for_gc_type(bool gcs_are_young,
938 bool during_initial_mark,
939 bool during_marking);
940
941 inline void set_evacuation_failure_alot_for_current_gc();
942
943 // Return true if it's time to cause an evacuation failure.
944 inline bool evacuation_should_fail();
945
946 // Reset the G1EvacuationFailureALot counters. Should be called at
947 // the end of an evacuation pause in which an evacuation failure ocurred.
948 inline void reset_evacuation_should_fail();
949 #endif // !PRODUCT
917 950
918 // ("Weak") Reference processing support. 951 // ("Weak") Reference processing support.
919 // 952 //
920 // G1 has 2 instances of the referece processor class. One 953 // G1 has 2 instances of the referece processor class. One
921 // (_ref_processor_cm) handles reference object discovery 954 // (_ref_processor_cm) handles reference object discovery