Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/taskqueue.cpp @ 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 | df6caf649ff7 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1289:d47555d7aca8 | 1311:2a1472c30599 |
---|---|
28 #ifdef TRACESPINNING | 28 #ifdef TRACESPINNING |
29 uint ParallelTaskTerminator::_total_yields = 0; | 29 uint ParallelTaskTerminator::_total_yields = 0; |
30 uint ParallelTaskTerminator::_total_spins = 0; | 30 uint ParallelTaskTerminator::_total_spins = 0; |
31 uint ParallelTaskTerminator::_total_peeks = 0; | 31 uint ParallelTaskTerminator::_total_peeks = 0; |
32 #endif | 32 #endif |
33 | |
34 bool TaskQueueSuper::peek() { | |
35 return _bottom != _age.top(); | |
36 } | |
37 | 33 |
38 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { | 34 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { |
39 const int a = 16807; | 35 const int a = 16807; |
40 const int m = 2147483647; | 36 const int m = 2147483647; |
41 const int q = 127773; /* m div a */ | 37 const int q = 127773; /* m div a */ |
178 "Terminator may still be in use"); | 174 "Terminator may still be in use"); |
179 _offered_termination = 0; | 175 _offered_termination = 0; |
180 } | 176 } |
181 } | 177 } |
182 | 178 |
179 #ifdef ASSERT | |
180 bool ObjArrayTask::is_valid() const { | |
181 return _obj != NULL && _obj->is_objArray() && _index > 0 && | |
182 _index < objArrayOop(_obj)->length(); | |
183 } | |
184 #endif // ASSERT | |
185 | |
183 bool RegionTaskQueueWithOverflow::is_empty() { | 186 bool RegionTaskQueueWithOverflow::is_empty() { |
184 return (_region_queue.size() == 0) && | 187 return (_region_queue.size() == 0) && |
185 (_overflow_stack->length() == 0); | 188 (_overflow_stack->length() == 0); |
186 } | 189 } |
187 | 190 |