mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6994322: Remove the is_tlab and is_noref / is_large_noref parameters from the CollectedHeap
Remove two unused parameters from the mem_allocate() method and update its uses accordingly. Reviewed-by: stefank, johnc
This commit is contained in:
parent
43d9e95a42
commit
937d6ded89
17 changed files with 55 additions and 131 deletions
|
@ -122,7 +122,7 @@ void CollectedHeap::post_allocation_setup_array(KlassHandle klass,
|
|||
post_allocation_notify(klass, (oop)obj);
|
||||
}
|
||||
|
||||
HeapWord* CollectedHeap::common_mem_allocate_noinit(size_t size, bool is_noref, TRAPS) {
|
||||
HeapWord* CollectedHeap::common_mem_allocate_noinit(size_t size, TRAPS) {
|
||||
|
||||
// Clear unhandled oops for memory allocation. Memory allocation might
|
||||
// not take out a lock if from tlab, so clear here.
|
||||
|
@ -133,7 +133,6 @@ HeapWord* CollectedHeap::common_mem_allocate_noinit(size_t size, bool is_noref,
|
|||
return NULL; // caller does a CHECK_0 too
|
||||
}
|
||||
|
||||
// We may want to update this, is_noref objects might not be allocated in TLABs.
|
||||
HeapWord* result = NULL;
|
||||
if (UseTLAB) {
|
||||
result = CollectedHeap::allocate_from_tlab(THREAD, size);
|
||||
|
@ -145,8 +144,6 @@ HeapWord* CollectedHeap::common_mem_allocate_noinit(size_t size, bool is_noref,
|
|||
}
|
||||
bool gc_overhead_limit_was_exceeded = false;
|
||||
result = Universe::heap()->mem_allocate(size,
|
||||
is_noref,
|
||||
false,
|
||||
&gc_overhead_limit_was_exceeded);
|
||||
if (result != NULL) {
|
||||
NOT_PRODUCT(Universe::heap()->
|
||||
|
@ -183,8 +180,8 @@ HeapWord* CollectedHeap::common_mem_allocate_noinit(size_t size, bool is_noref,
|
|||
}
|
||||
}
|
||||
|
||||
HeapWord* CollectedHeap::common_mem_allocate_init(size_t size, bool is_noref, TRAPS) {
|
||||
HeapWord* obj = common_mem_allocate_noinit(size, is_noref, CHECK_NULL);
|
||||
HeapWord* CollectedHeap::common_mem_allocate_init(size_t size, TRAPS) {
|
||||
HeapWord* obj = common_mem_allocate_noinit(size, CHECK_NULL);
|
||||
init_obj(obj, size);
|
||||
return obj;
|
||||
}
|
||||
|
@ -255,7 +252,7 @@ oop CollectedHeap::obj_allocate(KlassHandle klass, int size, TRAPS) {
|
|||
debug_only(check_for_valid_allocation_state());
|
||||
assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
|
||||
assert(size >= 0, "int won't convert to size_t");
|
||||
HeapWord* obj = common_mem_allocate_init(size, false, CHECK_NULL);
|
||||
HeapWord* obj = common_mem_allocate_init(size, CHECK_NULL);
|
||||
post_allocation_setup_obj(klass, obj, size);
|
||||
NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
|
||||
return (oop)obj;
|
||||
|
@ -268,20 +265,7 @@ oop CollectedHeap::array_allocate(KlassHandle klass,
|
|||
debug_only(check_for_valid_allocation_state());
|
||||
assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
|
||||
assert(size >= 0, "int won't convert to size_t");
|
||||
HeapWord* obj = common_mem_allocate_init(size, false, CHECK_NULL);
|
||||
post_allocation_setup_array(klass, obj, size, length);
|
||||
NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
|
||||
return (oop)obj;
|
||||
}
|
||||
|
||||
oop CollectedHeap::large_typearray_allocate(KlassHandle klass,
|
||||
int size,
|
||||
int length,
|
||||
TRAPS) {
|
||||
debug_only(check_for_valid_allocation_state());
|
||||
assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed");
|
||||
assert(size >= 0, "int won't convert to size_t");
|
||||
HeapWord* obj = common_mem_allocate_init(size, true, CHECK_NULL);
|
||||
HeapWord* obj = common_mem_allocate_init(size, CHECK_NULL);
|
||||
post_allocation_setup_array(klass, obj, size, length);
|
||||
NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size));
|
||||
return (oop)obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue