File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/hotspot/share/gc/parallel Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -262,8 +262,9 @@ bool PSOldGen::expand_to_reserved() {
262
262
}
263
263
264
264
void PSOldGen::shrink (size_t bytes) {
265
- assert_lock_strong (PSOldGenExpand_lock);
266
- assert_locked_or_safepoint (Heap_lock);
265
+ assert (Thread::current ()->is_VM_thread (), " precondition" );
266
+ assert (SafepointSynchronize::is_at_safepoint (), " precondition" );
267
+ assert (bytes > 0 , " precondition" );
267
268
268
269
size_t size = align_down (bytes, virtual_space ()->alignment ());
269
270
if (size > 0 ) {
@@ -314,11 +315,9 @@ void PSOldGen::resize(size_t desired_free_space) {
314
315
}
315
316
if (new_size > current_size) {
316
317
size_t change_bytes = new_size - current_size;
317
- MutexLocker x (PSOldGenExpand_lock);
318
318
expand (change_bytes);
319
319
} else {
320
320
size_t change_bytes = current_size - new_size;
321
- MutexLocker x (PSOldGenExpand_lock);
322
321
shrink (change_bytes);
323
322
}
324
323
You can’t perform that action at this time.
0 commit comments