OpenJDK / zgc / zgc
changeset 51263:53772937ea84
8205676: ZGC: Remove TLAB allocations in relocation path
Reviewed-by: stefank, eosterlund
author | pliden |
---|---|
date | Wed, 27 Jun 2018 19:45:05 +0200 |
parents | f8c8bfd59e05 |
children | 3c45465c70ff |
files | src/hotspot/share/gc/z/zObjectAllocator.cpp |
diffstat | 1 files changed, 0 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/z/zObjectAllocator.cpp Wed Jun 27 10:06:03 2018 -0700 +++ b/src/hotspot/share/gc/z/zObjectAllocator.cpp Wed Jun 27 19:45:05 2018 +0200 @@ -133,14 +133,6 @@ uintptr_t ZObjectAllocator::alloc_small_object_from_nonworker(size_t size, ZAllocationFlags flags) { assert(ZThread::is_java() || ZThread::is_vm(), "Should be a Java or VM thread"); - if (flags.relocation() && flags.java_thread() && UseTLAB) { - // For relocations from Java threads, try TLAB allocation first - const uintptr_t addr = (uintptr_t)Thread::current()->tlab().allocate(ZUtils::bytes_to_words(size)); - if (addr != 0) { - return addr; - } - } - // Non-worker small page allocation can never use the reserve flags.set_no_reserve(); @@ -238,13 +230,6 @@ bool ZObjectAllocator::undo_alloc_small_object_from_nonworker(ZPage* page, uintptr_t addr, size_t size) { assert(page->type() == ZPageTypeSmall, "Invalid page type"); - if (ZThread::is_java()) { - // Try undo allocation in TLAB - if (Thread::current()->tlab().undo_allocate((HeapWord*)addr, ZUtils::bytes_to_words(size))) { - return true; - } - } - // Try atomic undo on shared page return page->undo_alloc_object_atomic(addr, size); }