6957084: simplify TaskQueue overflow handling

Reviewed-by: ysr, jmasa
This commit is contained in:
John Coomes 2010-07-01 21:40:45 -07:00
parent 091b24c59d
commit e8dbd32204
11 changed files with 200 additions and 447 deletions

View file

@ -26,7 +26,16 @@ void ParCompactionManager::push_objarray(oop obj, size_t index)
{
ObjArrayTask task(obj, index);
assert(task.is_valid(), "bad ObjArrayTask");
if (!_objarray_queue.push(task)) {
_objarray_overflow_stack->push(task);
}
_objarray_stack.push(task);
}
void ParCompactionManager::push_region(size_t index)
{
#ifdef ASSERT
const ParallelCompactData& sd = PSParallelCompact::summary_data();
ParallelCompactData::RegionData* const region_ptr = sd.region(index);
assert(region_ptr->claimed(), "must be claimed");
assert(region_ptr->_pushed++ == 0, "should only be pushed once");
#endif
region_stack()->push(index);
}