author | brutisso |
Thu, 31 May 2012 21:10:33 +0200 | |
changeset 12781 | dd6480eea079 |
parent 10565 | dc90c239f4ec |
child 14583 | d70ee55535f4 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
5918 | 2 |
* Copyright (c) 2001, 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:
5076
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5076
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:
5076
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "oops/oop.inline.hpp" |
|
27 |
#include "runtime/os.hpp" |
|
28 |
#include "utilities/debug.hpp" |
|
29 |
#include "utilities/stack.inline.hpp" |
|
30 |
#include "utilities/taskqueue.hpp" |
|
31 |
#ifdef TARGET_OS_FAMILY_linux |
|
32 |
# include "thread_linux.inline.hpp" |
|
33 |
#endif |
|
34 |
#ifdef TARGET_OS_FAMILY_solaris |
|
35 |
# include "thread_solaris.inline.hpp" |
|
36 |
#endif |
|
37 |
#ifdef TARGET_OS_FAMILY_windows |
|
38 |
# include "thread_windows.inline.hpp" |
|
39 |
#endif |
|
10565 | 40 |
#ifdef TARGET_OS_FAMILY_bsd |
41 |
# include "thread_bsd.inline.hpp" |
|
42 |
#endif |
|
1 | 43 |
|
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
44 |
#ifdef TRACESPINNING |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
45 |
uint ParallelTaskTerminator::_total_yields = 0; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
46 |
uint ParallelTaskTerminator::_total_spins = 0; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
47 |
uint ParallelTaskTerminator::_total_peeks = 0; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
48 |
#endif |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
49 |
|
6067 | 50 |
#if TASKQUEUE_STATS |
51 |
const char * const TaskQueueStats::_names[last_stat_id] = { |
|
52 |
"qpush", "qpop", "qpop-s", "qattempt", "qsteal", "opush", "omax" |
|
53 |
}; |
|
54 |
||
6251 | 55 |
TaskQueueStats & TaskQueueStats::operator +=(const TaskQueueStats & addend) |
56 |
{ |
|
57 |
for (unsigned int i = 0; i < last_stat_id; ++i) { |
|
58 |
_stats[i] += addend._stats[i]; |
|
59 |
} |
|
60 |
return *this; |
|
61 |
} |
|
62 |
||
6067 | 63 |
void TaskQueueStats::print_header(unsigned int line, outputStream* const stream, |
64 |
unsigned int width) |
|
65 |
{ |
|
66 |
// Use a width w: 1 <= w <= max_width |
|
67 |
const unsigned int max_width = 40; |
|
68 |
const unsigned int w = MAX2(MIN2(width, max_width), 1U); |
|
69 |
||
70 |
if (line == 0) { // spaces equal in width to the header |
|
71 |
const unsigned int hdr_width = w * last_stat_id + last_stat_id - 1; |
|
72 |
stream->print("%*s", hdr_width, " "); |
|
73 |
} else if (line == 1) { // labels |
|
74 |
stream->print("%*s", w, _names[0]); |
|
75 |
for (unsigned int i = 1; i < last_stat_id; ++i) { |
|
76 |
stream->print(" %*s", w, _names[i]); |
|
77 |
} |
|
78 |
} else if (line == 2) { // dashed lines |
|
79 |
char dashes[max_width + 1]; |
|
80 |
memset(dashes, '-', w); |
|
81 |
dashes[w] = '\0'; |
|
82 |
stream->print("%s", dashes); |
|
83 |
for (unsigned int i = 1; i < last_stat_id; ++i) { |
|
84 |
stream->print(" %s", dashes); |
|
85 |
} |
|
86 |
} |
|
87 |
} |
|
88 |
||
89 |
void TaskQueueStats::print(outputStream* stream, unsigned int width) const |
|
90 |
{ |
|
91 |
#define FMT SIZE_FORMAT_W(*) |
|
92 |
stream->print(FMT, width, _stats[0]); |
|
93 |
for (unsigned int i = 1; i < last_stat_id; ++i) { |
|
94 |
stream->print(" " FMT, width, _stats[i]); |
|
95 |
} |
|
96 |
#undef FMT |
|
97 |
} |
|
6251 | 98 |
|
99 |
#ifdef ASSERT |
|
100 |
// Invariants which should hold after a TaskQueue has been emptied and is |
|
101 |
// quiescent; they do not hold at arbitrary times. |
|
102 |
void TaskQueueStats::verify() const |
|
103 |
{ |
|
104 |
assert(get(push) == get(pop) + get(steal), |
|
105 |
err_msg("push=" SIZE_FORMAT " pop=" SIZE_FORMAT " steal=" SIZE_FORMAT, |
|
106 |
get(push), get(pop), get(steal))); |
|
107 |
assert(get(pop_slow) <= get(pop), |
|
108 |
err_msg("pop_slow=" SIZE_FORMAT " pop=" SIZE_FORMAT, |
|
109 |
get(pop_slow), get(pop))); |
|
110 |
assert(get(steal) <= get(steal_attempt), |
|
111 |
err_msg("steal=" SIZE_FORMAT " steal_attempt=" SIZE_FORMAT, |
|
112 |
get(steal), get(steal_attempt))); |
|
113 |
assert(get(overflow) == 0 || get(push) != 0, |
|
114 |
err_msg("overflow=" SIZE_FORMAT " push=" SIZE_FORMAT, |
|
115 |
get(overflow), get(push))); |
|
116 |
assert(get(overflow_max_len) == 0 || get(overflow) != 0, |
|
117 |
err_msg("overflow_max_len=" SIZE_FORMAT " overflow=" SIZE_FORMAT, |
|
118 |
get(overflow_max_len), get(overflow))); |
|
119 |
} |
|
120 |
#endif // ASSERT |
|
6067 | 121 |
#endif // TASKQUEUE_STATS |
122 |
||
1 | 123 |
int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { |
124 |
const int a = 16807; |
|
125 |
const int m = 2147483647; |
|
126 |
const int q = 127773; /* m div a */ |
|
127 |
const int r = 2836; /* m mod a */ |
|
128 |
assert(sizeof(int) == 4, "I think this relies on that"); |
|
129 |
int seed = *seed0; |
|
130 |
int hi = seed / q; |
|
131 |
int lo = seed % q; |
|
132 |
int test = a * lo - r * hi; |
|
133 |
if (test > 0) |
|
134 |
seed = test; |
|
135 |
else |
|
136 |
seed = test + m; |
|
137 |
*seed0 = seed; |
|
138 |
return seed; |
|
139 |
} |
|
140 |
||
141 |
ParallelTaskTerminator:: |
|
142 |
ParallelTaskTerminator(int n_threads, TaskQueueSetSuper* queue_set) : |
|
143 |
_n_threads(n_threads), |
|
144 |
_queue_set(queue_set), |
|
145 |
_offered_termination(0) {} |
|
146 |
||
147 |
bool ParallelTaskTerminator::peek_in_queue_set() { |
|
148 |
return _queue_set->peek(); |
|
149 |
} |
|
150 |
||
151 |
void ParallelTaskTerminator::yield() { |
|
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
2105
diff
changeset
|
152 |
assert(_offered_termination <= _n_threads, "Invariant"); |
1 | 153 |
os::yield(); |
154 |
} |
|
155 |
||
156 |
void ParallelTaskTerminator::sleep(uint millis) { |
|
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
2105
diff
changeset
|
157 |
assert(_offered_termination <= _n_threads, "Invariant"); |
1 | 158 |
os::sleep(Thread::current(), millis, false); |
159 |
} |
|
160 |
||
1374 | 161 |
bool |
162 |
ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { |
|
6759
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
163 |
assert(_n_threads > 0, "Initialization is incorrect"); |
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
2105
diff
changeset
|
164 |
assert(_offered_termination < _n_threads, "Invariant"); |
1 | 165 |
Atomic::inc(&_offered_termination); |
166 |
||
2005
42075507972b
6787254: Work queue capacity can be increased substantially on some platforms
ysr
parents:
1623
diff
changeset
|
167 |
uint yield_count = 0; |
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
168 |
// Number of hard spin loops done since last yield |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
169 |
uint hard_spin_count = 0; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
170 |
// Number of iterations in the hard spin loop. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
171 |
uint hard_spin_limit = WorkStealingHardSpins; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
172 |
|
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
173 |
// If WorkStealingSpinToYieldRatio is 0, no hard spinning is done. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
174 |
// If it is greater than 0, then start with a small number |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
175 |
// of spins and increase number with each turn at spinning until |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
176 |
// the count of hard spins exceeds WorkStealingSpinToYieldRatio. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
177 |
// Then do a yield() call and start spinning afresh. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
178 |
if (WorkStealingSpinToYieldRatio > 0) { |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
179 |
hard_spin_limit = WorkStealingHardSpins >> WorkStealingSpinToYieldRatio; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
180 |
hard_spin_limit = MAX2(hard_spin_limit, 1U); |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
181 |
} |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
182 |
// Remember the initial spin limit. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
183 |
uint hard_spin_start = hard_spin_limit; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
184 |
|
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
185 |
// Loop waiting for all threads to offer termination or |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
186 |
// more work. |
1 | 187 |
while (true) { |
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
2105
diff
changeset
|
188 |
assert(_offered_termination <= _n_threads, "Invariant"); |
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
189 |
// Are all threads offering termination? |
1 | 190 |
if (_offered_termination == _n_threads) { |
191 |
return true; |
|
192 |
} else { |
|
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
193 |
// Look for more work. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
194 |
// Periodically sleep() instead of yield() to give threads |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
195 |
// waiting on the cores the chance to grab this code |
1 | 196 |
if (yield_count <= WorkStealingYieldsBeforeSleep) { |
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
197 |
// Do a yield or hardspin. For purposes of deciding whether |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
198 |
// to sleep, count this as a yield. |
1 | 199 |
yield_count++; |
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
200 |
|
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
201 |
// Periodically call yield() instead spinning |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
202 |
// After WorkStealingSpinToYieldRatio spins, do a yield() call |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
203 |
// and reset the counts and starting limit. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
204 |
if (hard_spin_count > WorkStealingSpinToYieldRatio) { |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
205 |
yield(); |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
206 |
hard_spin_count = 0; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
207 |
hard_spin_limit = hard_spin_start; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
208 |
#ifdef TRACESPINNING |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
209 |
_total_yields++; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
210 |
#endif |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
211 |
} else { |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
212 |
// Hard spin this time |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
213 |
// Increase the hard spinning period but only up to a limit. |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
214 |
hard_spin_limit = MIN2(2*hard_spin_limit, |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
215 |
(uint) WorkStealingHardSpins); |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
216 |
for (uint j = 0; j < hard_spin_limit; j++) { |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
217 |
SpinPause(); |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
218 |
} |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
219 |
hard_spin_count++; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
220 |
#ifdef TRACESPINNING |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
221 |
_total_spins++; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
222 |
#endif |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
223 |
} |
1 | 224 |
} else { |
225 |
if (PrintGCDetails && Verbose) { |
|
226 |
gclog_or_tty->print_cr("ParallelTaskTerminator::offer_termination() " |
|
227 |
"thread %d sleeps after %d yields", |
|
228 |
Thread::current(), yield_count); |
|
229 |
} |
|
230 |
yield_count = 0; |
|
231 |
// A sleep will cause this processor to seek work on another processor's |
|
232 |
// runqueue, if it has nothing else to run (as opposed to the yield |
|
233 |
// which may only move the thread to the end of the this processor's |
|
234 |
// runqueue). |
|
235 |
sleep(WorkStealingSleepMillis); |
|
236 |
} |
|
237 |
||
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
238 |
#ifdef TRACESPINNING |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
239 |
_total_peeks++; |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
240 |
#endif |
1374 | 241 |
if (peek_in_queue_set() || |
242 |
(terminator != NULL && terminator->should_exit_termination())) { |
|
1 | 243 |
Atomic::dec(&_offered_termination); |
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
2105
diff
changeset
|
244 |
assert(_offered_termination < _n_threads, "Invariant"); |
1 | 245 |
return false; |
246 |
} |
|
247 |
} |
|
248 |
} |
|
249 |
} |
|
250 |
||
2010
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
251 |
#ifdef TRACESPINNING |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
252 |
void ParallelTaskTerminator::print_termination_counts() { |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
253 |
gclog_or_tty->print_cr("ParallelTaskTerminator Total yields: %lld " |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
254 |
"Total spins: %lld Total peeks: %lld", |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
255 |
total_yields(), |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
256 |
total_spins(), |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
257 |
total_peeks()); |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
258 |
} |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
259 |
#endif |
c13462bbad17
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
2005
diff
changeset
|
260 |
|
1 | 261 |
void ParallelTaskTerminator::reset_for_reuse() { |
262 |
if (_offered_termination != 0) { |
|
263 |
assert(_offered_termination == _n_threads, |
|
264 |
"Terminator may still be in use"); |
|
265 |
_offered_termination = 0; |
|
266 |
} |
|
267 |
} |
|
268 |
||
5076
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
269 |
#ifdef ASSERT |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
270 |
bool ObjArrayTask::is_valid() const { |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
271 |
return _obj != NULL && _obj->is_objArray() && _index > 0 && |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
272 |
_index < objArrayOop(_obj)->length(); |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
273 |
} |
8b74a4b60b31
4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
3262
diff
changeset
|
274 |
#endif // ASSERT |
6759
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
275 |
|
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
276 |
void ParallelTaskTerminator::reset_for_reuse(int n_threads) { |
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
277 |
reset_for_reuse(); |
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
278 |
_n_threads = n_threads; |
67b1a69ef5aa
6984287: Regularize how GC parallel workers are specified.
jmasa
parents:
6251
diff
changeset
|
279 |
} |