840 struct OopAndMarkOop {
841 private:
842 oop _o;
843 markOop _m;
844 public:
845 OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) {
846 }
847
848 void set_mark() {
849 _o->set_mark(_m);
850 }
851 };
852
853 typedef Stack<OopAndMarkOop,mtGC> OopAndMarkOopStack;
854 // Stores marks with the corresponding oop that we need to preserve during evacuation
855 // failure.
856 OopAndMarkOopStack* _preserved_objs;
857
858 // Preserve the mark of "obj", if necessary, in preparation for its mark
859 // word being overwritten with a self-forwarding-pointer.
860 void preserve_mark_during_evac_failure(uint queue, oop obj, markOop m);
861
862 #ifndef PRODUCT
863 // Support for forcing evacuation failures. Analogous to
864 // PromotionFailureALot for the other collectors.
865
866 // Records whether G1EvacuationFailureALot should be in effect
867 // for the current GC
868 bool _evacuation_failure_alot_for_current_gc;
869
870 // Used to record the GC number for interval checking when
871 // determining whether G1EvaucationFailureALot is in effect
872 // for the current GC.
873 size_t _evacuation_failure_alot_gc_number;
874
875 // Count of the number of evacuations between failures.
876 volatile size_t _evacuation_failure_alot_count;
877
878 // Set whether G1EvacuationFailureALot should be in effect
879 // for the current GC (based upon the type of GC and which
880 // command line flags are set);
|
840 struct OopAndMarkOop {
841 private:
842 oop _o;
843 markOop _m;
844 public:
845 OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) {
846 }
847
848 void set_mark() {
849 _o->set_mark(_m);
850 }
851 };
852
853 typedef Stack<OopAndMarkOop,mtGC> OopAndMarkOopStack;
854 // Stores marks with the corresponding oop that we need to preserve during evacuation
855 // failure.
856 OopAndMarkOopStack* _preserved_objs;
857
858 // Preserve the mark of "obj", if necessary, in preparation for its mark
859 // word being overwritten with a self-forwarding-pointer.
860 void preserve_mark_during_evac_failure(uint worker_id, oop obj, markOop m);
861
862 #ifndef PRODUCT
863 // Support for forcing evacuation failures. Analogous to
864 // PromotionFailureALot for the other collectors.
865
866 // Records whether G1EvacuationFailureALot should be in effect
867 // for the current GC
868 bool _evacuation_failure_alot_for_current_gc;
869
870 // Used to record the GC number for interval checking when
871 // determining whether G1EvaucationFailureALot is in effect
872 // for the current GC.
873 size_t _evacuation_failure_alot_gc_number;
874
875 // Count of the number of evacuations between failures.
876 volatile size_t _evacuation_failure_alot_count;
877
878 // Set whether G1EvacuationFailureALot should be in effect
879 // for the current GC (based upon the type of GC and which
880 // command line flags are set);
|