comparison src/share/vm/gc_implementation/g1/heapRegionManager.hpp @ 23031:e5406a79ae90

8061715: gc/g1/TestShrinkAuxiliaryData15.java fails with java.lang.RuntimeException: heap decommit failed - after > before Summary: added WhiteBox methods to count regions and exact aux data sizes Reviewed-by: jwilhelm, brutisso
author azakharov
date Tue, 19 May 2015 15:49:27 +0200
parents a8ea2f110d87
children dd9cc155639c
comparison
equal deleted inserted replaced
23030:399885e13e90 23031:e5406a79ae90
1 /* 1 /*
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP
27 27
28 #include "gc_implementation/g1/g1BiasedArray.hpp" 28 #include "gc_implementation/g1/g1BiasedArray.hpp"
29 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp" 29 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
30 #include "gc_implementation/g1/heapRegionSet.hpp" 30 #include "gc_implementation/g1/heapRegionSet.hpp"
31 #include "services/memoryUsage.hpp"
31 32
32 class HeapRegion; 33 class HeapRegion;
33 class HeapRegionClosure; 34 class HeapRegionClosure;
34 class FreeRegionList; 35 class FreeRegionList;
35 36
195 uint length() const { return _num_committed; } 196 uint length() const { return _num_committed; }
196 197
197 // Return the maximum number of regions in the heap. 198 // Return the maximum number of regions in the heap.
198 uint max_length() const { return (uint)_regions.length(); } 199 uint max_length() const { return (uint)_regions.length(); }
199 200
201 MemoryUsage get_auxiliary_data_memory_usage() const;
202
200 MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); } 203 MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); }
201 204
202 // Expand the sequence to reflect that the heap has grown. Either create new 205 // Expand the sequence to reflect that the heap has grown. Either create new
203 // HeapRegions, or re-use existing ones. Returns the number of regions the 206 // HeapRegions, or re-use existing ones. Returns the number of regions the
204 // sequence was expanded by. If a HeapRegion allocation fails, the resulting 207 // sequence was expanded by. If a HeapRegion allocation fails, the resulting