author | jmasa |
Tue, 09 Aug 2011 10:16:01 -0700 | |
changeset 11174 | fccee5238e70 |
parent 7397 | 5b173b4ca846 |
child 11178 | 8318f84ac604 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
5918 | 2 |
* Copyright (c) 2005, 2010, 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:
5080
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5080
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:
5080
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "classfile/systemDictionary.hpp" |
|
27 |
#include "gc_implementation/parallelScavenge/gcTaskManager.hpp" |
|
28 |
#include "gc_implementation/parallelScavenge/objectStartArray.hpp" |
|
29 |
#include "gc_implementation/parallelScavenge/parMarkBitMap.hpp" |
|
30 |
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" |
|
31 |
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp" |
|
32 |
#include "gc_implementation/parallelScavenge/psOldGen.hpp" |
|
33 |
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp" |
|
34 |
#include "oops/objArrayKlass.inline.hpp" |
|
35 |
#include "oops/oop.hpp" |
|
36 |
#include "oops/oop.inline.hpp" |
|
37 |
#include "oops/oop.pcgc.inline.hpp" |
|
38 |
#include "utilities/stack.inline.hpp" |
|
1 | 39 |
|
40 |
PSOldGen* ParCompactionManager::_old_gen = NULL; |
|
41 |
ParCompactionManager** ParCompactionManager::_manager_array = NULL; |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
42 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
43 |
RegionTaskQueue** ParCompactionManager::_region_list = NULL; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
44 |
|
1 | 45 |
OopTaskQueueSet* ParCompactionManager::_stack_array = NULL; |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
46 |
ParCompactionManager::ObjArrayTaskQueueSet* |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
47 |
ParCompactionManager::_objarray_queues = NULL; |
1 | 48 |
ObjectStartArray* ParCompactionManager::_start_array = NULL; |
49 |
ParMarkBitMap* ParCompactionManager::_mark_bitmap = NULL; |
|
5918 | 50 |
RegionTaskQueueSet* ParCompactionManager::_region_array = NULL; |
1 | 51 |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
52 |
uint* ParCompactionManager::_recycled_stack_index = NULL; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
53 |
int ParCompactionManager::_recycled_top = -1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
54 |
int ParCompactionManager::_recycled_bottom = -1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
55 |
|
1 | 56 |
ParCompactionManager::ParCompactionManager() : |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
57 |
_action(CopyAndUpdate), |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
58 |
_region_stack(NULL), |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
59 |
_region_stack_index((uint)max_uintx) { |
1 | 60 |
|
61 |
ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); |
|
62 |
assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity"); |
|
63 |
||
64 |
_old_gen = heap->old_gen(); |
|
65 |
_start_array = old_gen()->start_array(); |
|
66 |
||
67 |
marking_stack()->initialize(); |
|
5918 | 68 |
_objarray_stack.initialize(); |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
69 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
70 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
71 |
ParCompactionManager::~ParCompactionManager() { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
72 |
delete _recycled_stack_index; |
1 | 73 |
} |
74 |
||
75 |
void ParCompactionManager::initialize(ParMarkBitMap* mbm) { |
|
76 |
assert(PSParallelCompact::gc_task_manager() != NULL, |
|
77 |
"Needed for initialization"); |
|
78 |
||
79 |
_mark_bitmap = mbm; |
|
80 |
||
81 |
uint parallel_gc_threads = PSParallelCompact::gc_task_manager()->workers(); |
|
82 |
||
83 |
assert(_manager_array == NULL, "Attempt to initialize twice"); |
|
84 |
_manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads+1 ); |
|
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
85 |
guarantee(_manager_array != NULL, "Could not allocate manager_array"); |
1 | 86 |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
87 |
_region_list = NEW_C_HEAP_ARRAY(RegionTaskQueue*, |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
88 |
parallel_gc_threads+1); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
89 |
guarantee(_region_list != NULL, "Could not initialize promotion manager"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
90 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
91 |
_recycled_stack_index = NEW_C_HEAP_ARRAY(uint, parallel_gc_threads); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
92 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
93 |
// parallel_gc-threads + 1 to be consistent with the number of |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
94 |
// compaction managers. |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
95 |
for(uint i=0; i<parallel_gc_threads + 1; i++) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
96 |
_region_list[i] = new RegionTaskQueue(); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
97 |
region_list(i)->initialize(); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
98 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
99 |
|
1 | 100 |
_stack_array = new OopTaskQueueSet(parallel_gc_threads); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
101 |
guarantee(_stack_array != NULL, "Could not allocate stack_array"); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
102 |
_objarray_queues = new ObjArrayTaskQueueSet(parallel_gc_threads); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
103 |
guarantee(_objarray_queues != NULL, "Could not allocate objarray_queues"); |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
104 |
_region_array = new RegionTaskQueueSet(parallel_gc_threads); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
105 |
guarantee(_region_array != NULL, "Could not allocate region_array"); |
1 | 106 |
|
107 |
// Create and register the ParCompactionManager(s) for the worker threads. |
|
108 |
for(uint i=0; i<parallel_gc_threads; i++) { |
|
109 |
_manager_array[i] = new ParCompactionManager(); |
|
110 |
guarantee(_manager_array[i] != NULL, "Could not create ParCompactionManager"); |
|
111 |
stack_array()->register_queue(i, _manager_array[i]->marking_stack()); |
|
5918 | 112 |
_objarray_queues->register_queue(i, &_manager_array[i]->_objarray_stack); |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
113 |
region_array()->register_queue(i, region_list(i)); |
1 | 114 |
} |
115 |
||
116 |
// The VMThread gets its own ParCompactionManager, which is not available |
|
117 |
// for work stealing. |
|
118 |
_manager_array[parallel_gc_threads] = new ParCompactionManager(); |
|
119 |
guarantee(_manager_array[parallel_gc_threads] != NULL, |
|
120 |
"Could not create ParCompactionManager"); |
|
121 |
assert(PSParallelCompact::gc_task_manager()->workers() != 0, |
|
122 |
"Not initialized?"); |
|
123 |
} |
|
124 |
||
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
125 |
int ParCompactionManager::pop_recycled_stack_index() { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
126 |
assert(_recycled_bottom <= _recycled_top, "list is empty"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
127 |
// Get the next available index |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
128 |
if (_recycled_bottom < _recycled_top) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
129 |
uint cur, next, last; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
130 |
do { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
131 |
cur = _recycled_bottom; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
132 |
next = cur + 1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
133 |
last = Atomic::cmpxchg(next, &_recycled_bottom, cur); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
134 |
} while (cur != last); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
135 |
return _recycled_stack_index[next]; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
136 |
} else { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
137 |
return -1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
138 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
139 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
140 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
141 |
void ParCompactionManager::push_recycled_stack_index(uint v) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
142 |
// Get the next available index |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
143 |
int cur = Atomic::add(1, &_recycled_top); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
144 |
_recycled_stack_index[cur] = v; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
145 |
assert(_recycled_bottom <= _recycled_top, "list top and bottom are wrong"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
146 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
147 |
|
1 | 148 |
bool ParCompactionManager::should_update() { |
149 |
assert(action() != NotValid, "Action is not set"); |
|
150 |
return (action() == ParCompactionManager::Update) || |
|
151 |
(action() == ParCompactionManager::CopyAndUpdate) || |
|
152 |
(action() == ParCompactionManager::UpdateAndCopy); |
|
153 |
} |
|
154 |
||
155 |
bool ParCompactionManager::should_copy() { |
|
156 |
assert(action() != NotValid, "Action is not set"); |
|
157 |
return (action() == ParCompactionManager::Copy) || |
|
158 |
(action() == ParCompactionManager::CopyAndUpdate) || |
|
159 |
(action() == ParCompactionManager::UpdateAndCopy); |
|
160 |
} |
|
161 |
||
162 |
bool ParCompactionManager::should_verify_only() { |
|
163 |
assert(action() != NotValid, "Action is not set"); |
|
164 |
return action() == ParCompactionManager::VerifyUpdate; |
|
165 |
} |
|
166 |
||
167 |
bool ParCompactionManager::should_reset_only() { |
|
168 |
assert(action() != NotValid, "Action is not set"); |
|
169 |
return action() == ParCompactionManager::ResetObjects; |
|
170 |
} |
|
171 |
||
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
172 |
void ParCompactionManager::region_list_push(uint list_index, |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
173 |
size_t region_index) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
174 |
region_list(list_index)->push(region_index); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
175 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
176 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
177 |
void ParCompactionManager::verify_region_list_empty(uint list_index) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
178 |
assert(region_list(list_index)->is_empty(), "Not empty"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
179 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
180 |
|
1 | 181 |
ParCompactionManager* |
182 |
ParCompactionManager::gc_thread_compaction_manager(int index) { |
|
183 |
assert(index >= 0 && index < (int)ParallelGCThreads, "index out of range"); |
|
184 |
assert(_manager_array != NULL, "Sanity"); |
|
185 |
return _manager_array[index]; |
|
186 |
} |
|
187 |
||
188 |
void ParCompactionManager::reset() { |
|
6762
f8d1b560700e
6423256: GC stacks should use a better data structure
jcoomes
parents:
5918
diff
changeset
|
189 |
for(uint i = 0; i < ParallelGCThreads + 1; i++) { |
f8d1b560700e
6423256: GC stacks should use a better data structure
jcoomes
parents:
5918
diff
changeset
|
190 |
assert(manager_array(i)->revisit_klass_stack()->is_empty(), "sanity"); |
f8d1b560700e
6423256: GC stacks should use a better data structure
jcoomes
parents:
5918
diff
changeset
|
191 |
assert(manager_array(i)->revisit_mdo_stack()->is_empty(), "sanity"); |
1 | 192 |
} |
193 |
} |
|
194 |
||
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
195 |
void ParCompactionManager::follow_marking_stacks() { |
1 | 196 |
do { |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
197 |
// Drain the overflow stack first, to allow stealing from the marking stack. |
5080
eff0cc882603
6935839: excessive marking stack growth during full gcs
jcoomes
parents:
5076
diff
changeset
|
198 |
oop obj; |
5918 | 199 |
while (marking_stack()->pop_overflow(obj)) { |
200 |
obj->follow_contents(this); |
|
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
201 |
} |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
202 |
while (marking_stack()->pop_local(obj)) { |
1 | 203 |
obj->follow_contents(this); |
204 |
} |
|
205 |
||
5080
eff0cc882603
6935839: excessive marking stack growth during full gcs
jcoomes
parents:
5076
diff
changeset
|
206 |
// Process ObjArrays one at a time to avoid marking stack bloat. |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
207 |
ObjArrayTask task; |
5918 | 208 |
if (_objarray_stack.pop_overflow(task)) { |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
209 |
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
210 |
k->oop_follow_contents(this, task.obj(), task.index()); |
5918 | 211 |
} else if (_objarray_stack.pop_local(task)) { |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
212 |
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
213 |
k->oop_follow_contents(this, task.obj(), task.index()); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
214 |
} |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
215 |
} while (!marking_stacks_empty()); |
1 | 216 |
|
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
217 |
assert(marking_stacks_empty(), "Sanity"); |
1 | 218 |
} |
219 |
||
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
220 |
void ParCompactionManager::drain_region_stacks() { |
1 | 221 |
do { |
5918 | 222 |
// Drain overflow stack first so other threads can steal. |
223 |
size_t region_index; |
|
224 |
while (region_stack()->pop_overflow(region_index)) { |
|
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
225 |
PSParallelCompact::fill_and_update_region(this, region_index); |
1 | 226 |
} |
227 |
||
5918 | 228 |
while (region_stack()->pop_local(region_index)) { |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
229 |
PSParallelCompact::fill_and_update_region(this, region_index); |
1 | 230 |
} |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
231 |
} while (!region_stack()->is_empty()); |
1 | 232 |
} |