@@ -163,7 +163,7 @@ bool PSOldGen::expand_for_allocate(size_t word_size) {
163
163
assert (word_size > 0 , " allocating zero words?" );
164
164
bool result = true ;
165
165
{
166
- MutexLocker x (ExpandHeap_lock );
166
+ MutexLocker x (PSOldGenExpand_lock );
167
167
// Avoid "expand storms" by rechecking available space after obtaining
168
168
// the lock, because another thread may have already made sufficient
169
169
// space available. If insufficient space available, that will remain
@@ -181,7 +181,7 @@ bool PSOldGen::expand_for_allocate(size_t word_size) {
181
181
}
182
182
183
183
bool PSOldGen::expand (size_t bytes) {
184
- assert_lock_strong (ExpandHeap_lock );
184
+ assert_lock_strong (PSOldGenExpand_lock );
185
185
assert_locked_or_safepoint (Heap_lock);
186
186
assert (bytes > 0 , " precondition" );
187
187
const size_t alignment = virtual_space ()->alignment ();
@@ -219,7 +219,7 @@ bool PSOldGen::expand(size_t bytes) {
219
219
}
220
220
221
221
bool PSOldGen::expand_by (size_t bytes) {
222
- assert_lock_strong (ExpandHeap_lock );
222
+ assert_lock_strong (PSOldGenExpand_lock );
223
223
assert_locked_or_safepoint (Heap_lock);
224
224
assert (bytes > 0 , " precondition" );
225
225
bool result = virtual_space ()->expand_by (bytes);
@@ -255,7 +255,7 @@ bool PSOldGen::expand_by(size_t bytes) {
255
255
}
256
256
257
257
bool PSOldGen::expand_to_reserved () {
258
- assert_lock_strong (ExpandHeap_lock );
258
+ assert_lock_strong (PSOldGenExpand_lock );
259
259
assert_locked_or_safepoint (Heap_lock);
260
260
261
261
bool result = false ;
@@ -268,12 +268,11 @@ bool PSOldGen::expand_to_reserved() {
268
268
}
269
269
270
270
void PSOldGen::shrink (size_t bytes) {
271
- assert_lock_strong (ExpandHeap_lock );
271
+ assert_lock_strong (PSOldGenExpand_lock );
272
272
assert_locked_or_safepoint (Heap_lock);
273
273
274
274
size_t size = align_down (bytes, virtual_space ()->alignment ());
275
275
if (size > 0 ) {
276
- assert_lock_strong (ExpandHeap_lock);
277
276
virtual_space ()->shrink_by (bytes);
278
277
post_resize ();
279
278
@@ -312,11 +311,11 @@ void PSOldGen::resize(size_t desired_free_space) {
312
311
}
313
312
if (new_size > current_size) {
314
313
size_t change_bytes = new_size - current_size;
315
- MutexLocker x (ExpandHeap_lock );
314
+ MutexLocker x (PSOldGenExpand_lock );
316
315
expand (change_bytes);
317
316
} else {
318
317
size_t change_bytes = current_size - new_size;
319
- MutexLocker x (ExpandHeap_lock );
318
+ MutexLocker x (PSOldGenExpand_lock );
320
319
shrink (change_bytes);
321
320
}
322
321
1 commit comments
openjdk-notifier[bot] commentedon Feb 15, 2022
Review
Issues