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 |