1879N/A * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// parallelScavenge collector. 0N/A// This task scans all the roots of a given type. 0N/A char*
name() {
return (
char *)
"scavenge-roots-task"; }
0N/A// This task scans the roots of a single thread. This task 0N/A// enables scanning of thread roots in parallel. 0N/A char*
name() {
return (
char *)
"thread-roots-task"; }
0N/A// This task is used to distribute work to idle threads. 0N/A char*
name() {
return (
char *)
"steal-task"; }
0N/A// SerialOldToYoungRootsTask 0N/A// This task is used to scan for roots in the perm gen 0N/A char*
name() {
return (
char *)
"serial-old-to-young-roots-task"; }
0N/A// OldToYoungRootsTask 0N/A// This task is used to scan old to young roots in parallel 2941N/A// A GC thread executing this tasks divides the generation (old gen) 2941N/A// into slices and takes a stripe in the slice as its part of the 2941N/A// +===============+ slice 0 2941N/A// +===============+ slice 1 2941N/A// +===============+ slice 2 2941N/A// A task is created for each stripe. In this case there are 4 tasks 2941N/A// created. A GC thread first works on its stripe within slice 0 2941N/A// and then moves to its stripe in the next slice until all stripes 2941N/A// exceed the top of the generation. Note that having fewer GC threads 2941N/A// than stripes works because all the tasks are executed so all stripes 2941N/A// will be covered. In this example if 4 tasks have been created to cover 2941N/A// all the stripes and there are only 3 threads, one of the threads will 2941N/A// get the tasks with the 4th stripe. However, there is a dependence in 2941N/A// CardTableExtension::scavenge_contents_parallel() on the number 2941N/A// of tasks created. In scavenge_contents_parallel the distance 2941N/A// to the next stripe is calculated based on the number of tasks. 2941N/A// If the stripe width is ssize, a task's next stripe is at 2941N/A// ssize * number_of_tasks (= slice_stride). In this case after 2941N/A// finishing stripe 0 in slice 0, the thread finds the stripe 0 in slice1 2941N/A// by adding slice_stride to the start of stripe 0 in slice 0 to get 2941N/A// to the start of stride 0 in slice 1. 0N/A char*
name() {
return (
char *)
"old-to-young-roots-task"; }
1879N/A#
endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSTASKS_HPP