author | david |
Fri, 05 Jun 2015 09:50:09 +0200 | |
changeset 31330 | 77061bb01b18 |
parent 30764 | fec48bf5a827 |
child 33611 | 9abd65805e19 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
29792
8c6fa07f0869
8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents:
25351
diff
changeset
|
2 |
* Copyright (c) 2005, 2015, 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" |
|
30764 | 27 |
#include "gc/parallel/gcTaskManager.hpp" |
28 |
#include "gc/parallel/objectStartArray.hpp" |
|
29 |
#include "gc/parallel/parMarkBitMap.hpp" |
|
30 |
#include "gc/parallel/parallelScavengeHeap.hpp" |
|
31 |
#include "gc/parallel/psCompactionManager.inline.hpp" |
|
32 |
#include "gc/parallel/psOldGen.hpp" |
|
33 |
#include "gc/parallel/psParallelCompact.inline.hpp" |
|
34 |
#include "gc/shared/taskqueue.inline.hpp" |
|
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
35 |
#include "memory/iterator.inline.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
36 |
#include "oops/instanceKlass.inline.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
37 |
#include "oops/instanceMirrorKlass.inline.hpp" |
7397 | 38 |
#include "oops/objArrayKlass.inline.hpp" |
39 |
#include "oops/oop.inline.hpp" |
|
25351
7c198a690050
8044775: Improve usage of umbrella header atomic.inline.hpp.
goetz
parents:
17370
diff
changeset
|
40 |
#include "runtime/atomic.inline.hpp" |
1 | 41 |
|
42 |
PSOldGen* ParCompactionManager::_old_gen = NULL; |
|
43 |
ParCompactionManager** ParCompactionManager::_manager_array = NULL; |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
44 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
45 |
RegionTaskQueue** ParCompactionManager::_region_list = NULL; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
46 |
|
1 | 47 |
OopTaskQueueSet* ParCompactionManager::_stack_array = NULL; |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
48 |
ParCompactionManager::ObjArrayTaskQueueSet* |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
49 |
ParCompactionManager::_objarray_queues = NULL; |
1 | 50 |
ObjectStartArray* ParCompactionManager::_start_array = NULL; |
51 |
ParMarkBitMap* ParCompactionManager::_mark_bitmap = NULL; |
|
5918 | 52 |
RegionTaskQueueSet* ParCompactionManager::_region_array = NULL; |
1 | 53 |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
54 |
uint* ParCompactionManager::_recycled_stack_index = NULL; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
55 |
int ParCompactionManager::_recycled_top = -1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
56 |
int ParCompactionManager::_recycled_bottom = -1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
57 |
|
1 | 58 |
ParCompactionManager::ParCompactionManager() : |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
59 |
_action(CopyAndUpdate), |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
60 |
_region_stack(NULL), |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
61 |
_region_stack_index((uint)max_uintx) { |
1 | 62 |
|
30173
13cf7580b000
8077413: Avoid use of Universe::heap() inside collectors
pliden
parents:
30151
diff
changeset
|
63 |
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); |
1 | 64 |
|
65 |
_old_gen = heap->old_gen(); |
|
66 |
_start_array = old_gen()->start_array(); |
|
67 |
||
68 |
marking_stack()->initialize(); |
|
5918 | 69 |
_objarray_stack.initialize(); |
11174
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 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
72 |
ParCompactionManager::~ParCompactionManager() { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
73 |
delete _recycled_stack_index; |
1 | 74 |
} |
75 |
||
76 |
void ParCompactionManager::initialize(ParMarkBitMap* mbm) { |
|
77 |
assert(PSParallelCompact::gc_task_manager() != NULL, |
|
78 |
"Needed for initialization"); |
|
79 |
||
80 |
_mark_bitmap = mbm; |
|
81 |
||
82 |
uint parallel_gc_threads = PSParallelCompact::gc_task_manager()->workers(); |
|
83 |
||
84 |
assert(_manager_array == NULL, "Attempt to initialize twice"); |
|
13195 | 85 |
_manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads+1, mtGC); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
86 |
guarantee(_manager_array != NULL, "Could not allocate manager_array"); |
1 | 87 |
|
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
88 |
_region_list = NEW_C_HEAP_ARRAY(RegionTaskQueue*, |
13195 | 89 |
parallel_gc_threads+1, mtGC); |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
90 |
guarantee(_region_list != NULL, "Could not initialize promotion manager"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
91 |
|
13195 | 92 |
_recycled_stack_index = NEW_C_HEAP_ARRAY(uint, parallel_gc_threads, mtGC); |
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
93 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
94 |
// 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
|
95 |
// compaction managers. |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
96 |
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
|
97 |
_region_list[i] = new RegionTaskQueue(); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
98 |
region_list(i)->initialize(); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
99 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
100 |
|
1 | 101 |
_stack_array = new OopTaskQueueSet(parallel_gc_threads); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
102 |
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
|
103 |
_objarray_queues = new ObjArrayTaskQueueSet(parallel_gc_threads); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
104 |
guarantee(_objarray_queues != NULL, "Could not allocate objarray_queues"); |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
105 |
_region_array = new RegionTaskQueueSet(parallel_gc_threads); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
106 |
guarantee(_region_array != NULL, "Could not allocate region_array"); |
1 | 107 |
|
108 |
// Create and register the ParCompactionManager(s) for the worker threads. |
|
109 |
for(uint i=0; i<parallel_gc_threads; i++) { |
|
110 |
_manager_array[i] = new ParCompactionManager(); |
|
111 |
guarantee(_manager_array[i] != NULL, "Could not create ParCompactionManager"); |
|
112 |
stack_array()->register_queue(i, _manager_array[i]->marking_stack()); |
|
5918 | 113 |
_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
|
114 |
region_array()->register_queue(i, region_list(i)); |
1 | 115 |
} |
116 |
||
117 |
// The VMThread gets its own ParCompactionManager, which is not available |
|
118 |
// for work stealing. |
|
119 |
_manager_array[parallel_gc_threads] = new ParCompactionManager(); |
|
120 |
guarantee(_manager_array[parallel_gc_threads] != NULL, |
|
121 |
"Could not create ParCompactionManager"); |
|
122 |
assert(PSParallelCompact::gc_task_manager()->workers() != 0, |
|
123 |
"Not initialized?"); |
|
124 |
} |
|
125 |
||
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
126 |
int ParCompactionManager::pop_recycled_stack_index() { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
127 |
assert(_recycled_bottom <= _recycled_top, "list is empty"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
128 |
// Get the next available index |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
129 |
if (_recycled_bottom < _recycled_top) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
130 |
uint cur, next, last; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
131 |
do { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
132 |
cur = _recycled_bottom; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
133 |
next = cur + 1; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
134 |
last = Atomic::cmpxchg(next, &_recycled_bottom, cur); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
135 |
} while (cur != last); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
136 |
return _recycled_stack_index[next]; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
137 |
} else { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
138 |
return -1; |
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 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
142 |
void ParCompactionManager::push_recycled_stack_index(uint v) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
143 |
// Get the next available index |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
144 |
int cur = Atomic::add(1, &_recycled_top); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
145 |
_recycled_stack_index[cur] = v; |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
146 |
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
|
147 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
148 |
|
1 | 149 |
bool ParCompactionManager::should_update() { |
150 |
assert(action() != NotValid, "Action is not set"); |
|
151 |
return (action() == ParCompactionManager::Update) || |
|
152 |
(action() == ParCompactionManager::CopyAndUpdate) || |
|
153 |
(action() == ParCompactionManager::UpdateAndCopy); |
|
154 |
} |
|
155 |
||
156 |
bool ParCompactionManager::should_copy() { |
|
157 |
assert(action() != NotValid, "Action is not set"); |
|
158 |
return (action() == ParCompactionManager::Copy) || |
|
159 |
(action() == ParCompactionManager::CopyAndUpdate) || |
|
160 |
(action() == ParCompactionManager::UpdateAndCopy); |
|
161 |
} |
|
162 |
||
11174
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
163 |
void ParCompactionManager::region_list_push(uint list_index, |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
164 |
size_t region_index) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
165 |
region_list(list_index)->push(region_index); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
166 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
167 |
|
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
168 |
void ParCompactionManager::verify_region_list_empty(uint list_index) { |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
169 |
assert(region_list(list_index)->is_empty(), "Not empty"); |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
170 |
} |
fccee5238e70
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents:
7397
diff
changeset
|
171 |
|
1 | 172 |
ParCompactionManager* |
31330
77061bb01b18
8081382: Make flags ParallelGCThreads and ConcGCThreads of type uint
david
parents:
30764
diff
changeset
|
173 |
ParCompactionManager::gc_thread_compaction_manager(uint index) { |
77061bb01b18
8081382: Make flags ParallelGCThreads and ConcGCThreads of type uint
david
parents:
30764
diff
changeset
|
174 |
assert(index < ParallelGCThreads, "index out of range"); |
1 | 175 |
assert(_manager_array != NULL, "Sanity"); |
176 |
return _manager_array[index]; |
|
177 |
} |
|
178 |
||
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
179 |
void InstanceKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
180 |
assert(obj != NULL, "can't follow the content of NULL object"); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
181 |
|
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
182 |
cm->follow_klass(this); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
183 |
// Only mark the header and let the scan of the meta-data mark |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
184 |
// everything else. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
185 |
|
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
186 |
ParCompactionManager::MarkAndPushClosure cl(cm); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
187 |
InstanceKlass::oop_oop_iterate_oop_maps<true>(obj, &cl); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
188 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
189 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
190 |
void InstanceMirrorKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
191 |
InstanceKlass::oop_pc_follow_contents(obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
192 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
193 |
// Follow the klass field in the mirror. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
194 |
Klass* klass = java_lang_Class::as_Klass(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
195 |
if (klass != NULL) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
196 |
// An anonymous class doesn't have its own class loader, so the call |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
197 |
// to follow_klass will mark and push its java mirror instead of the |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
198 |
// class loader. When handling the java mirror for an anonymous class |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
199 |
// we need to make sure its class loader data is claimed, this is done |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
200 |
// by calling follow_class_loader explicitly. For non-anonymous classes |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
201 |
// the call to follow_class_loader is made when the class loader itself |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
202 |
// is handled. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
203 |
if (klass->oop_is_instance() && InstanceKlass::cast(klass)->is_anonymous()) { |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
204 |
cm->follow_class_loader(klass->class_loader_data()); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
205 |
} else { |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
206 |
cm->follow_klass(klass); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
207 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
208 |
} else { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
209 |
// If klass is NULL then this a mirror for a primitive type. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
210 |
// We don't have to follow them, since they are handled as strong |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
211 |
// roots in Universe::oops_do. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
212 |
assert(java_lang_Class::is_primitive(obj), "Sanity check"); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
213 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
214 |
|
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
215 |
ParCompactionManager::MarkAndPushClosure cl(cm); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
216 |
oop_oop_iterate_statics<true>(obj, &cl); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
217 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
218 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
219 |
void InstanceClassLoaderKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
220 |
InstanceKlass::oop_pc_follow_contents(obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
221 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
222 |
ClassLoaderData * const loader_data = java_lang_ClassLoader::loader_data(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
223 |
if (loader_data != NULL) { |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
224 |
cm->follow_class_loader(loader_data); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
225 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
226 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
227 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
228 |
template <class T> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
229 |
static void oop_pc_follow_contents_specialized(InstanceRefKlass* klass, oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
230 |
T* referent_addr = (T*)java_lang_ref_Reference::referent_addr(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
231 |
T heap_oop = oopDesc::load_heap_oop(referent_addr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
232 |
debug_only( |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
233 |
if(TraceReferenceGC && PrintGCDetails) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
234 |
gclog_or_tty->print_cr("InstanceRefKlass::oop_pc_follow_contents " PTR_FORMAT, p2i(obj)); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
235 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
236 |
) |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
237 |
if (!oopDesc::is_null(heap_oop)) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
238 |
oop referent = oopDesc::decode_heap_oop_not_null(heap_oop); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
239 |
if (PSParallelCompact::mark_bitmap()->is_unmarked(referent) && |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
240 |
PSParallelCompact::ref_processor()->discover_reference(obj, klass->reference_type())) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
241 |
// reference already enqueued, referent will be traversed later |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
242 |
klass->InstanceKlass::oop_pc_follow_contents(obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
243 |
debug_only( |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
244 |
if(TraceReferenceGC && PrintGCDetails) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
245 |
gclog_or_tty->print_cr(" Non NULL enqueued " PTR_FORMAT, p2i(obj)); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
246 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
247 |
) |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
248 |
return; |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
249 |
} else { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
250 |
// treat referent as normal oop |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
251 |
debug_only( |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
252 |
if(TraceReferenceGC && PrintGCDetails) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
253 |
gclog_or_tty->print_cr(" Non NULL normal " PTR_FORMAT, p2i(obj)); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
254 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
255 |
) |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
256 |
cm->mark_and_push(referent_addr); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
257 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
258 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
259 |
T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj); |
30558
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
260 |
// Treat discovered as normal oop, if ref is not "active", |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
261 |
// i.e. if next is non-NULL. |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
262 |
T next_oop = oopDesc::load_heap_oop(next_addr); |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
263 |
if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active" |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
264 |
T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr(obj); |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
265 |
debug_only( |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
266 |
if(TraceReferenceGC && PrintGCDetails) { |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
267 |
gclog_or_tty->print_cr(" Process discovered as normal " |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
268 |
PTR_FORMAT, p2i(discovered_addr)); |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
269 |
} |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
270 |
) |
baec90a2699f
8031401: Remove unused code in the reference processor
kbarrett
parents:
30556
diff
changeset
|
271 |
cm->mark_and_push(discovered_addr); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
272 |
} |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
273 |
cm->mark_and_push(next_addr); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
274 |
klass->InstanceKlass::oop_pc_follow_contents(obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
275 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
276 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
277 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
278 |
void InstanceRefKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
279 |
if (UseCompressedOops) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
280 |
oop_pc_follow_contents_specialized<narrowOop>(this, obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
281 |
} else { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
282 |
oop_pc_follow_contents_specialized<oop>(this, obj, cm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
283 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
284 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
285 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
286 |
void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
30556
750fee2bdb45
8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents:
30173
diff
changeset
|
287 |
cm->follow_klass(this); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
288 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
289 |
if (UseCompressedOops) { |
30151
c7cdaa576875
8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents:
30150
diff
changeset
|
290 |
oop_pc_follow_contents_specialized<narrowOop>(objArrayOop(obj), 0, cm); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
291 |
} else { |
30151
c7cdaa576875
8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents:
30150
diff
changeset
|
292 |
oop_pc_follow_contents_specialized<oop>(objArrayOop(obj), 0, cm); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
293 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
294 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
295 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
296 |
void TypeArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
297 |
assert(obj->is_typeArray(),"must be a type array"); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
298 |
// Performance tweak: We skip iterating over the klass pointer since we |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
299 |
// know that Universe::TypeArrayKlass never moves. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
300 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29792
diff
changeset
|
301 |
|
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
302 |
void ParCompactionManager::follow_marking_stacks() { |
1 | 303 |
do { |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
304 |
// 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
|
305 |
oop obj; |
5918 | 306 |
while (marking_stack()->pop_overflow(obj)) { |
29792
8c6fa07f0869
8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents:
25351
diff
changeset
|
307 |
follow_contents(obj); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
308 |
} |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
309 |
while (marking_stack()->pop_local(obj)) { |
29792
8c6fa07f0869
8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents:
25351
diff
changeset
|
310 |
follow_contents(obj); |
1 | 311 |
} |
312 |
||
5080
eff0cc882603
6935839: excessive marking stack growth during full gcs
jcoomes
parents:
5076
diff
changeset
|
313 |
// 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
|
314 |
ObjArrayTask task; |
17370
59a0620561fa
8003557: NPG: Klass* const k should be const Klass* k.
minqi
parents:
13952
diff
changeset
|
315 |
if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) { |
29792
8c6fa07f0869
8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents:
25351
diff
changeset
|
316 |
follow_contents((objArrayOop)task.obj(), task.index()); |
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
317 |
} |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
318 |
} while (!marking_stacks_empty()); |
1 | 319 |
|
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3795
diff
changeset
|
320 |
assert(marking_stacks_empty(), "Sanity"); |
1 | 321 |
} |
322 |
||
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
323 |
void ParCompactionManager::drain_region_stacks() { |
1 | 324 |
do { |
5918 | 325 |
// Drain overflow stack first so other threads can steal. |
326 |
size_t region_index; |
|
327 |
while (region_stack()->pop_overflow(region_index)) { |
|
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
328 |
PSParallelCompact::fill_and_update_region(this, region_index); |
1 | 329 |
} |
330 |
||
5918 | 331 |
while (region_stack()->pop_local(region_index)) { |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
332 |
PSParallelCompact::fill_and_update_region(this, region_index); |
1 | 333 |
} |
1407
9006b01ba3fd
6725697: par compact - rename class ChunkData to RegionData
jcoomes
parents:
1
diff
changeset
|
334 |
} while (!region_stack()->is_empty()); |
1 | 335 |
} |