8259776: Remove ParallelGC non-CAS oldgen allocation

Reviewed-by: tschatzl, sjohanss
This commit is contained in:
Kim Barrett 2021-01-23 22:47:31 +00:00
parent 6c4c96fadf
commit 06348dfcae
10 changed files with 31 additions and 137 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -147,25 +147,6 @@ bool PSOldGen::is_allocated() {
return virtual_space()->reserved_size() != 0;
}
// Allocation. We report all successful allocations to the size policy
// Note that the perm gen does not use this method, and should not!
HeapWord* PSOldGen::allocate(size_t word_size) {
assert_locked_or_safepoint(Heap_lock);
HeapWord* res = allocate_noexpand(word_size);
if (res == NULL) {
res = expand_and_allocate(word_size);
}
// Allocations in the old generation need to be reported
if (res != NULL) {
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
heap->size_policy()->tenured_allocation(word_size * HeapWordSize);
}
return res;
}
size_t PSOldGen::num_iterable_blocks() const {
return (object_space()->used_in_bytes() + IterateBlockSize - 1) / IterateBlockSize;
}
@ -198,14 +179,6 @@ void PSOldGen::object_iterate_block(ObjectClosure* cl, size_t block_index) {
}
}
HeapWord* PSOldGen::expand_and_allocate(size_t word_size) {
expand(word_size*HeapWordSize);
if (GCExpandToAllocateDelayMillis > 0) {
os::naked_sleep(GCExpandToAllocateDelayMillis);
}
return allocate_noexpand(word_size);
}
HeapWord* PSOldGen::expand_and_cas_allocate(size_t word_size) {
expand(word_size*HeapWordSize);
if (GCExpandToAllocateDelayMillis > 0) {