Mercurial > hg > graal-compiler
diff src/share/vm/memory/defNewGeneration.hpp @ 1836:894b1d7c7e01
6423256: GC stacks should use a better data structure
6942771: SEGV in ParScanThreadState::take_from_overflow_stack
Reviewed-by: apetrusenko, ysr, pbk
author | jcoomes |
---|---|
date | Tue, 28 Sep 2010 15:56:15 -0700 |
parents | c18cbe5936b8 |
children | a7214d79fcf1 |
line wrap: on
line diff
--- a/src/share/vm/memory/defNewGeneration.hpp Tue Sep 28 09:51:37 2010 -0700 +++ b/src/share/vm/memory/defNewGeneration.hpp Tue Sep 28 15:56:15 2010 -0700 @@ -77,10 +77,10 @@ // word being overwritten with a self-forwarding-pointer. void preserve_mark_if_necessary(oop obj, markOop m); - // When one is non-null, so is the other. Together, they each pair is - // an object with a preserved mark, and its mark value. - GrowableArray<oop>* _objs_with_preserved_marks; - GrowableArray<markOop>* _preserved_marks_of_objs; + // Together, these keep <object with a preserved mark, mark value> pairs. + // They should always contain the same number of elements. + Stack<oop> _objs_with_preserved_marks; + Stack<markOop> _preserved_marks_of_objs; // Returns true if the collection can be safely attempted. // If this method returns false, a collection is not @@ -94,11 +94,7 @@ _promo_failure_scan_stack_closure = scan_stack_closure; } - GrowableArray<oop>* _promo_failure_scan_stack; - GrowableArray<oop>* promo_failure_scan_stack() const { - return _promo_failure_scan_stack; - } - void push_on_promo_failure_scan_stack(oop); + Stack<oop> _promo_failure_scan_stack; void drain_promo_failure_scan_stack(void); bool _promo_failure_drain_in_progress; @@ -184,8 +180,6 @@ void do_void(); }; - class FastEvacuateFollowersClosure; - friend class FastEvacuateFollowersClosure; class FastEvacuateFollowersClosure: public VoidClosure { GenCollectedHeap* _gch; int _level; @@ -336,6 +330,10 @@ void verify(bool allow_dirty); + bool promo_failure_scan_is_complete() const { + return _promo_failure_scan_stack.is_empty(); + } + protected: // If clear_space is true, clear the survivor spaces. Eden is // cleared if the minimum size of eden is 0. If mangle_space