annotate src/hotspot/share/gc/g1/g1FullGCCompactionPoint.hpp @ 49273:216c2aabbf1f

8196602: Change HeapRegionClosure to comply to naming conventions Reviewed-by: kbarrett, sjohanss
author tschatzl
date Fri, 09 Feb 2018 11:51:40 +0100
parents 5caa1d5f74c1
children
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"
stefank@48373 29 #include "oops/oopsHierarchy.hpp"
sjohanss@48073 30 #include "utilities/growableArray.hpp"
sjohanss@48073 31
sjohanss@48073 32 class HeapRegion;
sjohanss@48073 33
sjohanss@48073 34 class G1FullGCCompactionPoint : public CHeapObj<mtGC> {
sjohanss@48073 35 HeapRegion* _current_region;
sjohanss@48073 36 HeapWord* _threshold;
sjohanss@48073 37 HeapWord* _compaction_top;
sjohanss@48073 38 GrowableArray<HeapRegion*>* _compaction_regions;
sjohanss@48073 39 GrowableArrayIterator<HeapRegion*> _compaction_region_iterator;
sjohanss@48073 40
sjohanss@48073 41 bool object_will_fit(size_t size);
sjohanss@48073 42 void initialize_values(bool init_threshold);
sjohanss@48073 43 void switch_region();
sjohanss@48073 44 HeapRegion* next_region();
sjohanss@48073 45
sjohanss@48073 46 public:
sjohanss@48073 47 G1FullGCCompactionPoint();
sjohanss@48073 48 ~G1FullGCCompactionPoint();
sjohanss@48073 49
sjohanss@48073 50 bool has_regions();
sjohanss@48073 51 bool is_initialized();
sjohanss@48073 52 void initialize(HeapRegion* hr, bool init_threshold);
sjohanss@48073 53 void update();
sjohanss@48073 54 void forward(oop object, size_t size);
sjohanss@48073 55 void add(HeapRegion* hr);
sjohanss@48073 56 void merge(G1FullGCCompactionPoint* other);
sjohanss@48073 57
sjohanss@48073 58 HeapRegion* remove_last();
sjohanss@48073 59 HeapRegion* current_region();
sjohanss@48073 60
sjohanss@48073 61 GrowableArray<HeapRegion*>* regions();
sjohanss@48073 62 };
sjohanss@48073 63
sjohanss@48073 64 #endif // SHARE_GC_G1_G1FULLGCCOMPACTIONPOINT_HPP