mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-22 05:50:03 +00:00
8216285: Enable inlining of CollectedHeap::obj-/array-/class_allocate
Reviewed-by: ehelin
This commit is contained in:
parent
c9ae7d367f
commit
32b18201e8
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2019, 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
|
||||
@ -461,21 +461,6 @@ HeapWord* CollectedHeap::allocate_new_tlab(size_t min_size,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
|
||||
ObjAllocator allocator(klass, size, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
|
||||
ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
|
||||
ClassAllocator allocator(klass, size, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
void CollectedHeap::ensure_parsability(bool retire_tlabs) {
|
||||
assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
|
||||
"Should only be called at a safepoint or at start-up");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2019, 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
|
||||
@ -26,6 +26,7 @@
|
||||
#define SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
|
||||
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/memAllocator.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
|
||||
@ -66,4 +67,19 @@ inline HeapWord* CollectedHeap::align_allocation_or_fail(HeapWord* addr,
|
||||
}
|
||||
}
|
||||
|
||||
inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
|
||||
ObjAllocator allocator(klass, size, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
|
||||
ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
|
||||
ClassAllocator allocator(klass, size, THREAD);
|
||||
return allocator.allocate();
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user