annotate src/hotspot/share/gc/g1/g1FullGCCompactionPoint.hpp @ 48073:5caa1d5f74c1

8186571: Implementation: JEP 307: Parallel Full GC for G1 Summary: Improve G1 worst-case latencies by making the full GC parallel. Reviewed-by: tschatzl, sangheki, ehelin
author sjohanss
date Tue, 14 Nov 2017 11:33:23 +0100
parents
children 7c4d43c26352
rev   line source
sjohanss@48073 1 /*
sjohanss@48073 2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
sjohanss@48073 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
sjohanss@48073 4 *
sjohanss@48073 5 * This code is free software; you can redistribute it and/or modify it
sjohanss@48073 6 * under the terms of the GNU General Public License version 2 only, as
sjohanss@48073 7 * published by the Free Software Foundation.
sjohanss@48073 8 *
sjohanss@48073 9 * This code is distributed in the hope that it will be useful, but WITHOUT
sjohanss@48073 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
sjohanss@48073 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
sjohanss@48073 12 * version 2 for more details (a copy is included in the LICENSE file that
sjohanss@48073 13 * accompanied this code).
sjohanss@48073 14 *
sjohanss@48073 15 * You should have received a copy of the GNU General Public License version
sjohanss@48073 16 * 2 along with this work; if not, write to the Free Software Foundation,
sjohanss@48073 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
sjohanss@48073 18 *
sjohanss@48073 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
sjohanss@48073 20 * or visit www.oracle.com if you need additional information or have any
sjohanss@48073 21 * questions.
sjohanss@48073 22 *
sjohanss@48073 23 */
sjohanss@48073 24
sjohanss@48073 25 #ifndef SHARE_GC_G1_G1FULLGCCOMPACTIONPOINT_HPP
sjohanss@48073 26 #define SHARE_GC_G1_G1FULLGCCOMPACTIONPOINT_HPP
sjohanss@48073 27
sjohanss@48073 28 #include "memory/allocation.hpp"
sjohanss@48073 29 #include "utilities/growableArray.hpp"
sjohanss@48073 30
sjohanss@48073 31 class HeapRegion;
sjohanss@48073 32
sjohanss@48073 33 class G1FullGCCompactionPoint : public CHeapObj<mtGC> {
sjohanss@48073 34 HeapRegion* _current_region;
sjohanss@48073 35 HeapWord* _threshold;
sjohanss@48073 36 HeapWord* _compaction_top;
sjohanss@48073 37 GrowableArray<HeapRegion*>* _compaction_regions;
sjohanss@48073 38 GrowableArrayIterator<HeapRegion*> _compaction_region_iterator;
sjohanss@48073 39
sjohanss@48073 40 bool object_will_fit(size_t size);
sjohanss@48073 41 void initialize_values(bool init_threshold);
sjohanss@48073 42 void switch_region();
sjohanss@48073 43 HeapRegion* next_region();
sjohanss@48073 44
sjohanss@48073 45 public:
sjohanss@48073 46 G1FullGCCompactionPoint();
sjohanss@48073 47 ~G1FullGCCompactionPoint();
sjohanss@48073 48
sjohanss@48073 49 bool has_regions();
sjohanss@48073 50 bool is_initialized();
sjohanss@48073 51 void initialize(HeapRegion* hr, bool init_threshold);
sjohanss@48073 52 void update();
sjohanss@48073 53 void forward(oop object, size_t size);
sjohanss@48073 54 void add(HeapRegion* hr);
sjohanss@48073 55 void merge(G1FullGCCompactionPoint* other);
sjohanss@48073 56
sjohanss@48073 57 HeapRegion* remove_last();
sjohanss@48073 58 HeapRegion* current_region();
sjohanss@48073 59
sjohanss@48073 60 GrowableArray<HeapRegion*>* regions();
sjohanss@48073 61 };
sjohanss@48073 62
sjohanss@48073 63 #endif // SHARE_GC_G1_G1FULLGCCOMPACTIONPOINT_HPP