equal
deleted
inserted
replaced
31 #include "gc/g1/g1BiasedArray.hpp" |
31 #include "gc/g1/g1BiasedArray.hpp" |
32 #include "gc/g1/g1CollectorState.hpp" |
32 #include "gc/g1/g1CollectorState.hpp" |
33 #include "gc/g1/g1HRPrinter.hpp" |
33 #include "gc/g1/g1HRPrinter.hpp" |
34 #include "gc/g1/g1InCSetState.hpp" |
34 #include "gc/g1/g1InCSetState.hpp" |
35 #include "gc/g1/g1MonitoringSupport.hpp" |
35 #include "gc/g1/g1MonitoringSupport.hpp" |
|
36 #include "gc/g1/g1EvacFailure.hpp" |
36 #include "gc/g1/g1EvacStats.hpp" |
37 #include "gc/g1/g1EvacStats.hpp" |
37 #include "gc/g1/g1SATBCardTableModRefBS.hpp" |
38 #include "gc/g1/g1SATBCardTableModRefBS.hpp" |
38 #include "gc/g1/g1YCTypes.hpp" |
39 #include "gc/g1/g1YCTypes.hpp" |
39 #include "gc/g1/hSpaceCounters.hpp" |
40 #include "gc/g1/hSpaceCounters.hpp" |
40 #include "gc/g1/heapRegionManager.hpp" |
41 #include "gc/g1/heapRegionManager.hpp" |
778 |
779 |
779 // Failed evacuations cause some logical from-space objects to have |
780 // Failed evacuations cause some logical from-space objects to have |
780 // forwarding pointers to themselves. Reset them. |
781 // forwarding pointers to themselves. Reset them. |
781 void remove_self_forwarding_pointers(); |
782 void remove_self_forwarding_pointers(); |
782 |
783 |
783 struct OopAndMarkOop { |
784 // Restore the preserved mark words for objects with self-forwarding pointers. |
784 private: |
785 void restore_preserved_marks(); |
785 oop _o; |
786 |
786 markOop _m; |
787 // Restore the objects in the regions in the collection set after an |
787 public: |
788 // evacuation failure. |
788 OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) { |
789 void restore_after_evac_failure(); |
789 } |
790 |
790 |
|
791 void set_mark() { |
|
792 _o->set_mark(_m); |
|
793 } |
|
794 }; |
|
795 |
|
796 typedef Stack<OopAndMarkOop,mtGC> OopAndMarkOopStack; |
|
797 // Stores marks with the corresponding oop that we need to preserve during evacuation |
791 // Stores marks with the corresponding oop that we need to preserve during evacuation |
798 // failure. |
792 // failure. |
799 OopAndMarkOopStack* _preserved_objs; |
793 OopAndMarkOopStack* _preserved_objs; |
800 |
794 |
801 // Preserve the mark of "obj", if necessary, in preparation for its mark |
795 // Preserve the mark of "obj", if necessary, in preparation for its mark |