annotate src/share/vm/gc_implementation/g1/heapRegionSets.hpp @ 3285:49a67202bc67

7011855: G1: non-product flag to artificially grow the heap Summary: It introduces non-product cmd line parameter G1DummyRegionsPerGC which indicates how many "dummy" regions to allocate at the end of each GC. This allows the G1 heap to grow artificially and makes concurrent marking cycles more frequent irrespective of what the application that is running is doing. The dummy regions will be found totally empty during cleanup so this parameter can also be used to stress the concurrent cleanup operation. Reviewed-by: brutisso, johnc
author tonyp
date Tue, 19 Apr 2011 15:46:59 -0400
parents 0fa27f37d4d4
children fe189d4a44e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2152
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
1 /*
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
2 * copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
4 *
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
7 * published by the Free Software Foundation.
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
8 *
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
13 * accompanied this code).
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
14 *
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
18 *
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
21 * questions.
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
22 *
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
23 */
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
24
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
27
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
28 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
29
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
30 //////////////////// FreeRegionList ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
31
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
32 class FreeRegionList : public HeapRegionLinkedList {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
33 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
34 virtual const char* verify_region_extra(HeapRegion* hr);
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
35
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
36 virtual bool regions_humongous() { return false; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
37 virtual bool regions_empty() { return true; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
38
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
39 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
40 FreeRegionList(const char* name) : HeapRegionLinkedList(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
41 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
42
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
43 //////////////////// MasterFreeRegionList ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
44
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
45 class MasterFreeRegionList : public FreeRegionList {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
46 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
47 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
48
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
49 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
50 MasterFreeRegionList(const char* name) : FreeRegionList(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
51 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
52
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
53 //////////////////// SecondaryFreeRegionList ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
54
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
55 class SecondaryFreeRegionList : public FreeRegionList {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
56 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
57 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
58
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
59 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
60 SecondaryFreeRegionList(const char* name) : FreeRegionList(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
61 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
62
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
63 //////////////////// HumongousRegionSet ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
64
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
65 class HumongousRegionSet : public HeapRegionSet {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
66 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
67 virtual const char* verify_region_extra(HeapRegion* hr);
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
68
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
69 virtual bool regions_humongous() { return true; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
70 virtual bool regions_empty() { return false; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
71
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
72 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
73 HumongousRegionSet(const char* name) : HeapRegionSet(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
74 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
75
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
76 //////////////////// MasterHumongousRegionSet ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
77
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
78 class MasterHumongousRegionSet : public HumongousRegionSet {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
79 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
80 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
81
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
82 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
83 MasterHumongousRegionSet(const char* name) : HumongousRegionSet(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
84 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
85
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
86 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP