comparison src/share/vm/gc_implementation/shared/markSweep.hpp @ 1311:2a1472c30599

4396719: Mark Sweep stack overflow on deeply nested Object arrays Summary: Use an explicit stack for object arrays and process them in chunks. Reviewed-by: iveresov, apetrusenko
author jcoomes
date Wed, 03 Mar 2010 14:48:26 -0800
parents a1423fe86a18
children c18cbe5936b8
comparison
equal deleted inserted replaced
1289:d47555d7aca8 1311:2a1472c30599
108 108
109 // 109 //
110 // Vars 110 // Vars
111 // 111 //
112 protected: 112 protected:
113 // Traversal stack used during phase1 113 // Traversal stacks used during phase1
114 static GrowableArray<oop>* _marking_stack; 114 static GrowableArray<oop>* _marking_stack;
115 static GrowableArray<ObjArrayTask>* _objarray_stack;
115 // Stack for live klasses to revisit at end of marking phase 116 // Stack for live klasses to revisit at end of marking phase
116 static GrowableArray<Klass*>* _revisit_klass_stack; 117 static GrowableArray<Klass*>* _revisit_klass_stack;
117 // Set (stack) of MDO's to revisit at end of marking phase 118 // Set (stack) of MDO's to revisit at end of marking phase
118 static GrowableArray<DataLayout*>* _revisit_mdo_stack; 119 static GrowableArray<DataLayout*>* _revisit_mdo_stack;
119 120
186 template <class T> static inline void follow_root(T* p); 187 template <class T> static inline void follow_root(T* p);
187 // Mark pointer and follow contents. 188 // Mark pointer and follow contents.
188 template <class T> static inline void mark_and_follow(T* p); 189 template <class T> static inline void mark_and_follow(T* p);
189 // Check mark and maybe push on marking stack 190 // Check mark and maybe push on marking stack
190 template <class T> static inline void mark_and_push(T* p); 191 template <class T> static inline void mark_and_push(T* p);
192 static inline void push_objarray(oop obj, size_t index);
191 193
192 static void follow_stack(); // Empty marking stack. 194 static void follow_stack(); // Empty marking stack.
193 195
194 static void preserve_mark(oop p, markOop mark); 196 static void preserve_mark(oop p, markOop mark);
195 // Save the mark word so it can be restored later 197 // Save the mark word so it can be restored later