Mon, 20 Sep 2010 14:38:38 -0700
6984287: Regularize how GC parallel workers are specified.
Summary: Associate number of GC workers with the workgang as opposed to the task.
Reviewed-by: johnc, ysr
jcoomes@1746 | 1 | /* |
trims@1907 | 2 | * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
jcoomes@1746 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
jcoomes@1746 | 4 | * |
jcoomes@1746 | 5 | * This code is free software; you can redistribute it and/or modify it |
jcoomes@1746 | 6 | * under the terms of the GNU General Public License version 2 only, as |
jcoomes@1746 | 7 | * published by the Free Software Foundation. |
jcoomes@1746 | 8 | * |
jcoomes@1746 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
jcoomes@1746 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
jcoomes@1746 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
jcoomes@1746 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
jcoomes@1746 | 13 | * accompanied this code). |
jcoomes@1746 | 14 | * |
jcoomes@1746 | 15 | * You should have received a copy of the GNU General Public License version |
jcoomes@1746 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
jcoomes@1746 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
jcoomes@1746 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
jcoomes@1746 | 22 | * |
jcoomes@1746 | 23 | */ |
jcoomes@1746 | 24 | |
jcoomes@1746 | 25 | void ParCompactionManager::push_objarray(oop obj, size_t index) |
jcoomes@1746 | 26 | { |
jcoomes@1746 | 27 | ObjArrayTask task(obj, index); |
jcoomes@1746 | 28 | assert(task.is_valid(), "bad ObjArrayTask"); |
jcoomes@1993 | 29 | _objarray_stack.push(task); |
jcoomes@1746 | 30 | } |
jcoomes@1993 | 31 | |
jcoomes@1993 | 32 | void ParCompactionManager::push_region(size_t index) |
jcoomes@1993 | 33 | { |
jcoomes@1993 | 34 | #ifdef ASSERT |
jcoomes@1993 | 35 | const ParallelCompactData& sd = PSParallelCompact::summary_data(); |
jcoomes@1993 | 36 | ParallelCompactData::RegionData* const region_ptr = sd.region(index); |
jcoomes@1993 | 37 | assert(region_ptr->claimed(), "must be claimed"); |
jcoomes@1993 | 38 | assert(region_ptr->_pushed++ == 0, "should only be pushed once"); |
jcoomes@1993 | 39 | #endif |
jcoomes@1993 | 40 | region_stack()->push(index); |
jcoomes@1993 | 41 | } |