5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPARALLELCOMPACT_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPARALLELCOMPACT_HPP
27
28 #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
29 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
30 #include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
31 #include "gc_implementation/shared/collectorCounters.hpp"
32 #include "gc_implementation/shared/mutableSpace.hpp"
33 #include "gc_interface/collectedHeap.hpp"
34 #include "oops/oop.hpp"
35
36 class ParallelScavengeHeap;
37 class PSAdaptiveSizePolicy;
38 class PSYoungGen;
39 class PSOldGen;
40 class ParCompactionManager;
41 class ParallelTaskTerminator;
42 class PSParallelCompact;
43 class GCTaskManager;
44 class GCTaskQueue;
45 class PreGCValues;
46 class MoveAndUpdateClosure;
47 class RefProcTaskExecutor;
48 class ParallelOldTracer;
49 class STWGCTimer;
50
51 // The SplitInfo class holds the information needed to 'split' a source region
52 // so that the live data can be copied to two destination *spaces*. Normally,
53 // all the live data in a region is copied to a single destination space (e.g.,
1418 _start_array(PSParallelCompact::start_array(space_id))
1419 {
1420 assert(space_id == PSParallelCompact::old_space_id,
1421 "cannot use FillClosure in the young gen");
1422 }
1423
1424 virtual IterationStatus do_addr(HeapWord* addr, size_t size) {
1425 CollectedHeap::fill_with_objects(addr, size);
1426 HeapWord* const end = addr + size;
1427 do {
1428 _start_array->allocate_block(addr);
1429 addr += oop(addr)->size();
1430 } while (addr < end);
1431 return ParMarkBitMap::incomplete;
1432 }
1433
1434 private:
1435 ObjectStartArray* const _start_array;
1436 };
1437
1438 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPARALLELCOMPACT_HPP
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_HPP
26 #define SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_HPP
27
28 #include "gc/parallel/mutableSpace.hpp"
29 #include "gc/parallel/objectStartArray.hpp"
30 #include "gc/parallel/parMarkBitMap.hpp"
31 #include "gc/parallel/parallelScavengeHeap.hpp"
32 #include "gc/shared/collectedHeap.hpp"
33 #include "gc/shared/collectorCounters.hpp"
34 #include "oops/oop.hpp"
35
36 class ParallelScavengeHeap;
37 class PSAdaptiveSizePolicy;
38 class PSYoungGen;
39 class PSOldGen;
40 class ParCompactionManager;
41 class ParallelTaskTerminator;
42 class PSParallelCompact;
43 class GCTaskManager;
44 class GCTaskQueue;
45 class PreGCValues;
46 class MoveAndUpdateClosure;
47 class RefProcTaskExecutor;
48 class ParallelOldTracer;
49 class STWGCTimer;
50
51 // The SplitInfo class holds the information needed to 'split' a source region
52 // so that the live data can be copied to two destination *spaces*. Normally,
53 // all the live data in a region is copied to a single destination space (e.g.,
1418 _start_array(PSParallelCompact::start_array(space_id))
1419 {
1420 assert(space_id == PSParallelCompact::old_space_id,
1421 "cannot use FillClosure in the young gen");
1422 }
1423
1424 virtual IterationStatus do_addr(HeapWord* addr, size_t size) {
1425 CollectedHeap::fill_with_objects(addr, size);
1426 HeapWord* const end = addr + size;
1427 do {
1428 _start_array->allocate_block(addr);
1429 addr += oop(addr)->size();
1430 } while (addr < end);
1431 return ParMarkBitMap::incomplete;
1432 }
1433
1434 private:
1435 ObjectStartArray* const _start_array;
1436 };
1437
1438 #endif // SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_HPP
|