Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/utilities/taskqueue.cpp Wed Mar 03 08:10:41 2010 -0800 +++ b/src/share/vm/utilities/taskqueue.cpp Wed Mar 03 14:48:26 2010 -0800 @@ -31,10 +31,6 @@ uint ParallelTaskTerminator::_total_peeks = 0; #endif -bool TaskQueueSuper::peek() { - return _bottom != _age.top(); -} - int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { const int a = 16807; const int m = 2147483647; @@ -180,6 +176,13 @@ } } +#ifdef ASSERT +bool ObjArrayTask::is_valid() const { + return _obj != NULL && _obj->is_objArray() && _index > 0 && + _index < objArrayOop(_obj)->length(); +} +#endif // ASSERT + bool RegionTaskQueueWithOverflow::is_empty() { return (_region_queue.size() == 0) && (_overflow_stack->length() == 0);