Mercurial > hg > truffle
annotate src/share/vm/gc_implementation/parNew/parOopClosures.hpp @ 1648:8099e71601df
6968368: SIGSEGV in the BCEscapeAnalyzer::copy_dependencies
Summary: Use GrowableArray and VectorSet allocated in ciEnv arena.
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Wed, 14 Jul 2010 14:47:34 -0700 |
parents | c18cbe5936b8 |
children | a93a9eda13f7 |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
113
diff
changeset
|
2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
113
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
113
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
113
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 // Closures for ParNewGeneration | |
26 | |
27 class ParScanThreadState; | |
28 class ParNewGeneration; | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
29 typedef OopTaskQueueSet ObjToScanQueueSet; |
0 | 30 class ParallelTaskTerminator; |
31 | |
32 class ParScanClosure: public OopsInGenClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
33 protected: |
0 | 34 ParScanThreadState* _par_scan_state; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
35 ParNewGeneration* _g; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
36 HeapWord* _boundary; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
37 template <class T> void inline par_do_barrier(T* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
38 template <class T> void inline do_oop_work(T* p, |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
39 bool gc_barrier, |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
40 bool root_scan); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
41 public: |
0 | 42 ParScanClosure(ParNewGeneration* g, ParScanThreadState* par_scan_state); |
43 }; | |
44 | |
45 class ParScanWithBarrierClosure: public ParScanClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
46 public: |
0 | 47 ParScanWithBarrierClosure(ParNewGeneration* g, |
48 ParScanThreadState* par_scan_state) : | |
49 ParScanClosure(g, par_scan_state) {} | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
50 virtual void do_oop(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
51 virtual void do_oop(narrowOop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
52 inline void do_oop_nv(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
53 inline void do_oop_nv(narrowOop* p); |
0 | 54 }; |
55 | |
56 class ParScanWithoutBarrierClosure: public ParScanClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
57 public: |
0 | 58 ParScanWithoutBarrierClosure(ParNewGeneration* g, |
59 ParScanThreadState* par_scan_state) : | |
60 ParScanClosure(g, par_scan_state) {} | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
61 virtual void do_oop(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
62 virtual void do_oop(narrowOop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
63 inline void do_oop_nv(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
64 inline void do_oop_nv(narrowOop* p); |
0 | 65 }; |
66 | |
67 class ParRootScanWithBarrierTwoGensClosure: public ParScanClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
68 public: |
0 | 69 ParRootScanWithBarrierTwoGensClosure(ParNewGeneration* g, |
70 ParScanThreadState* par_scan_state) : | |
71 ParScanClosure(g, par_scan_state) {} | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
72 virtual void do_oop(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
73 virtual void do_oop(narrowOop* p); |
0 | 74 }; |
75 | |
76 class ParRootScanWithoutBarrierClosure: public ParScanClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
77 public: |
0 | 78 ParRootScanWithoutBarrierClosure(ParNewGeneration* g, |
79 ParScanThreadState* par_scan_state) : | |
80 ParScanClosure(g, par_scan_state) {} | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
81 virtual void do_oop(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
82 virtual void do_oop(narrowOop* p); |
0 | 83 }; |
84 | |
85 class ParScanWeakRefClosure: public ScanWeakRefClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
86 protected: |
0 | 87 ParScanThreadState* _par_scan_state; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
88 template <class T> inline void do_oop_work(T* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
89 public: |
0 | 90 ParScanWeakRefClosure(ParNewGeneration* g, |
91 ParScanThreadState* par_scan_state); | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
92 virtual void do_oop(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
93 virtual void do_oop(narrowOop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
94 inline void do_oop_nv(oop* p); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
95 inline void do_oop_nv(narrowOop* p); |
0 | 96 }; |
97 | |
98 class ParEvacuateFollowersClosure: public VoidClosure { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
99 private: |
0 | 100 ParScanThreadState* _par_scan_state; |
101 ParScanThreadState* par_scan_state() { return _par_scan_state; } | |
102 | |
103 // We want to preserve the specific types here (rather than "OopClosure") | |
104 // for later de-virtualization of do_oop calls. | |
105 ParScanWithoutBarrierClosure* _to_space_closure; | |
106 ParScanWithoutBarrierClosure* to_space_closure() { | |
107 return _to_space_closure; | |
108 } | |
109 ParRootScanWithoutBarrierClosure* _to_space_root_closure; | |
110 ParRootScanWithoutBarrierClosure* to_space_root_closure() { | |
111 return _to_space_root_closure; | |
112 } | |
113 | |
114 ParScanWithBarrierClosure* _old_gen_closure; | |
115 ParScanWithBarrierClosure* old_gen_closure () { | |
116 return _old_gen_closure; | |
117 } | |
118 ParRootScanWithBarrierTwoGensClosure* _old_gen_root_closure; | |
119 ParRootScanWithBarrierTwoGensClosure* old_gen_root_closure () { | |
120 return _old_gen_root_closure; | |
121 } | |
122 | |
123 ParNewGeneration* _par_gen; | |
124 ParNewGeneration* par_gen() { return _par_gen; } | |
125 | |
126 ObjToScanQueueSet* _task_queues; | |
127 ObjToScanQueueSet* task_queues() { return _task_queues; } | |
128 | |
129 ParallelTaskTerminator* _terminator; | |
130 ParallelTaskTerminator* terminator() { return _terminator; } | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
131 public: |
0 | 132 ParEvacuateFollowersClosure( |
133 ParScanThreadState* par_scan_state_, | |
134 ParScanWithoutBarrierClosure* to_space_closure_, | |
135 ParScanWithBarrierClosure* old_gen_closure_, | |
136 ParRootScanWithoutBarrierClosure* to_space_root_closure_, | |
137 ParNewGeneration* par_gen_, | |
138 ParRootScanWithBarrierTwoGensClosure* old_gen_root_closure_, | |
139 ObjToScanQueueSet* task_queues_, | |
140 ParallelTaskTerminator* terminator_); | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
141 virtual void do_void(); |
0 | 142 }; |