author | coleenp |
Sat, 01 Sep 2012 13:25:18 -0400 | |
changeset 13728 | 882756847a04 |
parent 7397 | 5b173b4ca846 |
child 18996 | 05c86e558c94 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
2 |
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3913
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3913
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3913
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_HPP |
26 |
#define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_HPP |
|
27 |
||
28 |
#include "memory/genOopClosures.hpp" |
|
29 |
||
1 | 30 |
///////////////////////////////////////////////////////////////// |
31 |
// Closures used by ConcurrentMarkSweepGeneration's collector |
|
32 |
///////////////////////////////////////////////////////////////// |
|
33 |
class ConcurrentMarkSweepGeneration; |
|
34 |
class CMSBitMap; |
|
35 |
class CMSMarkStack; |
|
36 |
class CMSCollector; |
|
37 |
class MarkFromRootsClosure; |
|
38 |
class Par_MarkFromRootsClosure; |
|
39 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
40 |
// Decode the oop and call do_oop on it. |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
41 |
#define DO_OOP_WORK_DEFN \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
42 |
void do_oop(oop obj); \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
43 |
template <class T> inline void do_oop_work(T* p) { \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
44 |
T heap_oop = oopDesc::load_heap_oop(p); \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
45 |
if (!oopDesc::is_null(heap_oop)) { \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
46 |
oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
47 |
do_oop(obj); \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
48 |
} \ |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
49 |
} |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
50 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
51 |
// Applies the given oop closure to all oops in all klasses visited. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
52 |
class CMKlassClosure : public KlassClosure { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
53 |
friend class CMSOopClosure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
54 |
friend class CMSOopsInGenClosure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
55 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
56 |
OopClosure* _oop_closure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
57 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
58 |
// Used when _oop_closure couldn't be set in an initialization list. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
59 |
void initialize(OopClosure* oop_closure) { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
60 |
assert(_oop_closure == NULL, "Should only be called once"); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
61 |
_oop_closure = oop_closure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
62 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
63 |
public: |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
64 |
CMKlassClosure(OopClosure* oop_closure = NULL) : _oop_closure(oop_closure) { } |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
65 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
66 |
void do_klass(Klass* k); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
67 |
}; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
68 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
69 |
// The base class for all CMS marking closures. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
70 |
// It's used to proxy through the metadata to the oops defined in them. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
71 |
class CMSOopClosure: public ExtendedOopClosure { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
72 |
CMKlassClosure _klass_closure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
73 |
public: |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
74 |
CMSOopClosure() : ExtendedOopClosure() { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
75 |
_klass_closure.initialize(this); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
76 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
77 |
CMSOopClosure(ReferenceProcessor* rp) : ExtendedOopClosure(rp) { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
78 |
_klass_closure.initialize(this); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
79 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
80 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
81 |
virtual bool do_metadata() { return do_metadata_nv(); } |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
82 |
inline bool do_metadata_nv() { return true; } |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
83 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
84 |
virtual void do_klass(Klass* k); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
85 |
void do_klass_nv(Klass* k); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
86 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
87 |
virtual void do_class_loader_data(ClassLoaderData* cld); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
88 |
}; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
89 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
90 |
// TODO: This duplication of the CMSOopClosure class is only needed because |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
91 |
// some CMS OopClosures derive from OopsInGenClosure. It would be good |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
92 |
// to get rid of them completely. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
93 |
class CMSOopsInGenClosure: public OopsInGenClosure { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
94 |
CMKlassClosure _klass_closure; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
95 |
public: |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
96 |
CMSOopsInGenClosure() { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
97 |
_klass_closure.initialize(this); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
98 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
99 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
100 |
virtual bool do_metadata() { return do_metadata_nv(); } |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
101 |
inline bool do_metadata_nv() { return true; } |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
102 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
103 |
virtual void do_klass(Klass* k); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
104 |
void do_klass_nv(Klass* k); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
105 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
106 |
virtual void do_class_loader_data(ClassLoaderData* cld); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
107 |
}; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
108 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
109 |
class MarkRefsIntoClosure: public CMSOopsInGenClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
110 |
private: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
111 |
const MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
112 |
CMSBitMap* _bitMap; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
113 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
114 |
DO_OOP_WORK_DEFN |
1 | 115 |
public: |
3913
e049e6b81e11
6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods
jrose
parents:
3912
diff
changeset
|
116 |
MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
117 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
118 |
virtual void do_oop(narrowOop* p); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
119 |
|
1 | 120 |
Prefetch::style prefetch_style() { |
121 |
return Prefetch::do_read; |
|
122 |
} |
|
123 |
}; |
|
124 |
||
125 |
// A variant of the above used in certain kinds of CMS |
|
126 |
// marking verification. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
127 |
class MarkRefsIntoVerifyClosure: public CMSOopsInGenClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
128 |
private: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
129 |
const MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
130 |
CMSBitMap* _verification_bm; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
131 |
CMSBitMap* _cms_bm; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
132 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
133 |
DO_OOP_WORK_DEFN |
1 | 134 |
public: |
135 |
MarkRefsIntoVerifyClosure(MemRegion span, CMSBitMap* verification_bm, |
|
3913
e049e6b81e11
6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods
jrose
parents:
3912
diff
changeset
|
136 |
CMSBitMap* cms_bm); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
137 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
138 |
virtual void do_oop(narrowOop* p); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
139 |
|
1 | 140 |
Prefetch::style prefetch_style() { |
141 |
return Prefetch::do_read; |
|
142 |
} |
|
143 |
}; |
|
144 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
145 |
// The non-parallel version (the parallel version appears further below). |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
146 |
class PushAndMarkClosure: public CMSOopClosure { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
147 |
private: |
3690 | 148 |
CMSCollector* _collector; |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
149 |
MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
150 |
CMSBitMap* _bit_map; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
151 |
CMSBitMap* _mod_union_table; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
152 |
CMSMarkStack* _mark_stack; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
153 |
bool _concurrent_precleaning; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
154 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
155 |
DO_OOP_WORK_DEFN |
1 | 156 |
public: |
157 |
PushAndMarkClosure(CMSCollector* collector, |
|
158 |
MemRegion span, |
|
159 |
ReferenceProcessor* rp, |
|
160 |
CMSBitMap* bit_map, |
|
161 |
CMSBitMap* mod_union_table, |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
162 |
CMSMarkStack* mark_stack, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
163 |
bool concurrent_precleaning); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
164 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
165 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
166 |
inline void do_oop_nv(oop* p) { PushAndMarkClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
167 |
inline void do_oop_nv(narrowOop* p) { PushAndMarkClosure::do_oop_work(p); } |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
168 |
|
1 | 169 |
Prefetch::style prefetch_style() { |
170 |
return Prefetch::do_read; |
|
171 |
} |
|
172 |
}; |
|
173 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
174 |
// In the parallel case, the bit map and the |
1 | 175 |
// reference processor are currently all shared. Access to |
176 |
// these shared mutable structures must use appropriate |
|
177 |
// synchronization (for instance, via CAS). The marking stack |
|
178 |
// used in the non-parallel case above is here replaced with |
|
179 |
// an OopTaskQueue structure to allow efficient work stealing. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
180 |
class Par_PushAndMarkClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
181 |
private: |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
182 |
CMSCollector* _collector; |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
183 |
MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
184 |
CMSBitMap* _bit_map; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
185 |
OopTaskQueue* _work_queue; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
186 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
187 |
DO_OOP_WORK_DEFN |
1 | 188 |
public: |
189 |
Par_PushAndMarkClosure(CMSCollector* collector, |
|
190 |
MemRegion span, |
|
191 |
ReferenceProcessor* rp, |
|
192 |
CMSBitMap* bit_map, |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
193 |
OopTaskQueue* work_queue); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
194 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
195 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
196 |
inline void do_oop_nv(oop* p) { Par_PushAndMarkClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
197 |
inline void do_oop_nv(narrowOop* p) { Par_PushAndMarkClosure::do_oop_work(p); } |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
198 |
|
1 | 199 |
Prefetch::style prefetch_style() { |
200 |
return Prefetch::do_read; |
|
201 |
} |
|
202 |
}; |
|
203 |
||
204 |
// The non-parallel version (the parallel version appears further below). |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
205 |
class MarkRefsIntoAndScanClosure: public CMSOopsInGenClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
206 |
private: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
207 |
MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
208 |
CMSBitMap* _bit_map; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
209 |
CMSMarkStack* _mark_stack; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
210 |
PushAndMarkClosure _pushAndMarkClosure; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
211 |
CMSCollector* _collector; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
212 |
Mutex* _freelistLock; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
213 |
bool _yield; |
1 | 214 |
// Whether closure is being used for concurrent precleaning |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
215 |
bool _concurrent_precleaning; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
216 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
217 |
DO_OOP_WORK_DEFN |
1 | 218 |
public: |
219 |
MarkRefsIntoAndScanClosure(MemRegion span, |
|
220 |
ReferenceProcessor* rp, |
|
221 |
CMSBitMap* bit_map, |
|
222 |
CMSBitMap* mod_union_table, |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
223 |
CMSMarkStack* mark_stack, |
1 | 224 |
CMSCollector* collector, |
225 |
bool should_yield, |
|
226 |
bool concurrent_precleaning); |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
227 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
228 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
229 |
inline void do_oop_nv(oop* p) { MarkRefsIntoAndScanClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
230 |
inline void do_oop_nv(narrowOop* p) { MarkRefsIntoAndScanClosure::do_oop_work(p); } |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
231 |
|
1 | 232 |
Prefetch::style prefetch_style() { |
233 |
return Prefetch::do_read; |
|
234 |
} |
|
235 |
void set_freelistLock(Mutex* m) { |
|
236 |
_freelistLock = m; |
|
237 |
} |
|
238 |
||
239 |
private: |
|
240 |
inline void do_yield_check(); |
|
241 |
void do_yield_work(); |
|
242 |
bool take_from_overflow_list(); |
|
243 |
}; |
|
244 |
||
245 |
// Tn this, the parallel avatar of MarkRefsIntoAndScanClosure, the revisit |
|
246 |
// stack and the bitMap are shared, so access needs to be suitably |
|
247 |
// sycnhronized. An OopTaskQueue structure, supporting efficient |
|
248 |
// workstealing, replaces a CMSMarkStack for storing grey objects. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
249 |
class Par_MarkRefsIntoAndScanClosure: public CMSOopsInGenClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
250 |
private: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
251 |
MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
252 |
CMSBitMap* _bit_map; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
253 |
OopTaskQueue* _work_queue; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
254 |
const uint _low_water_mark; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
255 |
Par_PushAndMarkClosure _par_pushAndMarkClosure; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
256 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
257 |
DO_OOP_WORK_DEFN |
1 | 258 |
public: |
259 |
Par_MarkRefsIntoAndScanClosure(CMSCollector* collector, |
|
260 |
MemRegion span, |
|
261 |
ReferenceProcessor* rp, |
|
262 |
CMSBitMap* bit_map, |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
263 |
OopTaskQueue* work_queue); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
264 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
265 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
266 |
inline void do_oop_nv(oop* p) { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
267 |
inline void do_oop_nv(narrowOop* p) { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); } |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
268 |
|
1 | 269 |
Prefetch::style prefetch_style() { |
270 |
return Prefetch::do_read; |
|
271 |
} |
|
272 |
void trim_queue(uint size); |
|
273 |
}; |
|
274 |
||
275 |
// This closure is used during the concurrent marking phase |
|
276 |
// following the first checkpoint. Its use is buried in |
|
277 |
// the closure MarkFromRootsClosure. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
278 |
class PushOrMarkClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
279 |
private: |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
280 |
CMSCollector* _collector; |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
281 |
MemRegion _span; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
282 |
CMSBitMap* _bitMap; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
283 |
CMSMarkStack* _markStack; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
284 |
HeapWord* const _finger; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
285 |
MarkFromRootsClosure* const |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
286 |
_parent; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
287 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
288 |
DO_OOP_WORK_DEFN |
1 | 289 |
public: |
290 |
PushOrMarkClosure(CMSCollector* cms_collector, |
|
291 |
MemRegion span, |
|
292 |
CMSBitMap* bitMap, |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
293 |
CMSMarkStack* markStack, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
294 |
HeapWord* finger, |
1 | 295 |
MarkFromRootsClosure* parent); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
296 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
297 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
298 |
inline void do_oop_nv(oop* p) { PushOrMarkClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
299 |
inline void do_oop_nv(narrowOop* p) { PushOrMarkClosure::do_oop_work(p); } |
3696 | 300 |
|
1 | 301 |
// Deal with a stack overflow condition |
302 |
void handle_stack_overflow(HeapWord* lost); |
|
303 |
private: |
|
304 |
inline void do_yield_check(); |
|
305 |
}; |
|
306 |
||
307 |
// A parallel (MT) version of the above. |
|
308 |
// This closure is used during the concurrent marking phase |
|
309 |
// following the first checkpoint. Its use is buried in |
|
310 |
// the closure Par_MarkFromRootsClosure. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
311 |
class Par_PushOrMarkClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
312 |
private: |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
313 |
CMSCollector* _collector; |
1 | 314 |
MemRegion _whole_span; |
315 |
MemRegion _span; // local chunk |
|
316 |
CMSBitMap* _bit_map; |
|
317 |
OopTaskQueue* _work_queue; |
|
318 |
CMSMarkStack* _overflow_stack; |
|
319 |
HeapWord* const _finger; |
|
320 |
HeapWord** const _global_finger_addr; |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
321 |
Par_MarkFromRootsClosure* const |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
322 |
_parent; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
323 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
324 |
DO_OOP_WORK_DEFN |
1 | 325 |
public: |
326 |
Par_PushOrMarkClosure(CMSCollector* cms_collector, |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
327 |
MemRegion span, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
328 |
CMSBitMap* bit_map, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
329 |
OopTaskQueue* work_queue, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
330 |
CMSMarkStack* mark_stack, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
331 |
HeapWord* finger, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
332 |
HeapWord** global_finger_addr, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
333 |
Par_MarkFromRootsClosure* parent); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
334 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
335 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
336 |
inline void do_oop_nv(oop* p) { Par_PushOrMarkClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
337 |
inline void do_oop_nv(narrowOop* p) { Par_PushOrMarkClosure::do_oop_work(p); } |
3696 | 338 |
|
1 | 339 |
// Deal with a stack overflow condition |
340 |
void handle_stack_overflow(HeapWord* lost); |
|
341 |
private: |
|
342 |
inline void do_yield_check(); |
|
343 |
}; |
|
344 |
||
345 |
// For objects in CMS generation, this closure marks |
|
346 |
// given objects (transitively) as being reachable/live. |
|
347 |
// This is currently used during the (weak) reference object |
|
1605
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
348 |
// processing phase of the CMS final checkpoint step, as |
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
349 |
// well as during the concurrent precleaning of the discovered |
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
350 |
// reference lists. |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
351 |
class CMSKeepAliveClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
352 |
private: |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
353 |
CMSCollector* _collector; |
390
2e094c1be4af
6662086: 6u4+, 7b11+: CMS never clears referents when -XX:+ParallelRefProcEnabled
ysr
parents:
360
diff
changeset
|
354 |
const MemRegion _span; |
1 | 355 |
CMSMarkStack* _mark_stack; |
356 |
CMSBitMap* _bit_map; |
|
1605
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
357 |
bool _concurrent_precleaning; |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
358 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
359 |
DO_OOP_WORK_DEFN |
1 | 360 |
public: |
361 |
CMSKeepAliveClosure(CMSCollector* collector, MemRegion span, |
|
1605
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
362 |
CMSBitMap* bit_map, CMSMarkStack* mark_stack, |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
363 |
bool cpc); |
1605
6b43d186eb8d
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents:
390
diff
changeset
|
364 |
bool concurrent_precleaning() const { return _concurrent_precleaning; } |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
365 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
366 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
367 |
inline void do_oop_nv(oop* p) { CMSKeepAliveClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
368 |
inline void do_oop_nv(narrowOop* p) { CMSKeepAliveClosure::do_oop_work(p); } |
1 | 369 |
}; |
370 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
371 |
class CMSInnerParMarkAndPushClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
372 |
private: |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
373 |
CMSCollector* _collector; |
1 | 374 |
MemRegion _span; |
375 |
OopTaskQueue* _work_queue; |
|
376 |
CMSBitMap* _bit_map; |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
377 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
378 |
DO_OOP_WORK_DEFN |
1 | 379 |
public: |
380 |
CMSInnerParMarkAndPushClosure(CMSCollector* collector, |
|
381 |
MemRegion span, CMSBitMap* bit_map, |
|
3690 | 382 |
OopTaskQueue* work_queue); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
383 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
384 |
virtual void do_oop(narrowOop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
385 |
inline void do_oop_nv(oop* p) { CMSInnerParMarkAndPushClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
386 |
inline void do_oop_nv(narrowOop* p) { CMSInnerParMarkAndPushClosure::do_oop_work(p); } |
1 | 387 |
}; |
388 |
||
389 |
// A parallel (MT) version of the above, used when |
|
390 |
// reference processing is parallel; the only difference |
|
391 |
// is in the do_oop method. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
392 |
class CMSParKeepAliveClosure: public CMSOopClosure { |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
393 |
private: |
1 | 394 |
MemRegion _span; |
395 |
OopTaskQueue* _work_queue; |
|
396 |
CMSBitMap* _bit_map; |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
397 |
CMSInnerParMarkAndPushClosure |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
398 |
_mark_and_push; |
1 | 399 |
const uint _low_water_mark; |
400 |
void trim_queue(uint max); |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
401 |
protected: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
402 |
DO_OOP_WORK_DEFN |
1 | 403 |
public: |
404 |
CMSParKeepAliveClosure(CMSCollector* collector, MemRegion span, |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
7397
diff
changeset
|
405 |
CMSBitMap* bit_map, OopTaskQueue* work_queue); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
406 |
virtual void do_oop(oop* p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
407 |
virtual void do_oop(narrowOop* p); |
1 | 408 |
}; |
7397 | 409 |
|
410 |
#endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_HPP |