annotate src/share/vm/gc_implementation/g1/heapRegionSets.hpp @ 12233:40136aa2cdb1

8010722: assert: failed: heap size is too big for compressed oops Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation. Reviewed-by: stefank, dholmes
author tschatzl
date Wed, 11 Sep 2013 16:25:02 +0200
parents 8aae2050e83e
children
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 /*
3765
ae5b2f1dcf12 7045662: G1: OopsInHeapRegionClosure::set_region() should not be virtual
tonyp
parents: 2152
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2152
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:
3777
e8b0b0392037 7046182: G1: remove unnecessary iterations over the collection set
tonyp
parents: 3765
diff changeset
47 virtual const char* verify_region_extra(HeapRegion* hr);
2152
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
48 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
49
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
50 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
51 MasterFreeRegionList(const char* name) : FreeRegionList(name) { }
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
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
54 //////////////////// SecondaryFreeRegionList ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
55
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
56 class SecondaryFreeRegionList : public FreeRegionList {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
57 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
58 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
59
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
60 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
61 SecondaryFreeRegionList(const char* name) : FreeRegionList(name) { }
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
4072
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
64 //////////////////// OldRegionSet ////////////////////
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
65
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
66 class OldRegionSet : public HeapRegionSet {
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
67 protected:
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
68 virtual const char* verify_region_extra(HeapRegion* hr);
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
69
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
70 virtual bool regions_humongous() { return false; }
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
71 virtual bool regions_empty() { return false; }
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
72
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
73 public:
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
74 OldRegionSet(const char* name) : HeapRegionSet(name) { }
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
75 };
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
76
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
77 //////////////////// MasterOldRegionSet ////////////////////
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
78
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
79 class MasterOldRegionSet : public OldRegionSet {
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
80 private:
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
81 protected:
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
82 virtual bool check_mt_safety();
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
83
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
84 public:
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
85 MasterOldRegionSet(const char* name) : OldRegionSet(name) { }
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
86 };
8aae2050e83e 7092309: G1: introduce old region set
tonyp
parents: 3777
diff changeset
87
2152
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
88 //////////////////// HumongousRegionSet ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
89
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
90 class HumongousRegionSet : public HeapRegionSet {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
91 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
92 virtual const char* verify_region_extra(HeapRegion* hr);
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
93
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
94 virtual bool regions_humongous() { return true; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
95 virtual bool regions_empty() { return false; }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
96
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
97 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
98 HumongousRegionSet(const char* name) : HeapRegionSet(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
99 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
100
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
101 //////////////////// MasterHumongousRegionSet ////////////////////
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
102
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
103 class MasterHumongousRegionSet : public HumongousRegionSet {
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
104 protected:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
105 virtual bool check_mt_safety();
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
106
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
107 public:
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
108 MasterHumongousRegionSet(const char* name) : HumongousRegionSet(name) { }
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
109 };
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
110
0fa27f37d4d4 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
111 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP