From 33e81229bd1b4b28cf2e35f0f8f0a42a04d59c3d Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 30 Apr 2024 13:52:08 +0000 Subject: [PATCH] 8331410: Remove unused MemAllocator::mem_allocate_inside_tlab Reviewed-by: tschatzl, gli --- src/hotspot/share/gc/shared/memAllocator.cpp | 14 -------------- src/hotspot/share/gc/shared/memAllocator.hpp | 1 - 2 files changed, 15 deletions(-) diff --git a/src/hotspot/share/gc/shared/memAllocator.cpp b/src/hotspot/share/gc/shared/memAllocator.cpp index 053f49dd6dd..971feed6aaf 100644 --- a/src/hotspot/share/gc/shared/memAllocator.cpp +++ b/src/hotspot/share/gc/shared/memAllocator.cpp @@ -250,19 +250,6 @@ HeapWord* MemAllocator::mem_allocate_outside_tlab(Allocation& allocation) const return mem; } -HeapWord* MemAllocator::mem_allocate_inside_tlab(Allocation& allocation) const { - assert(UseTLAB, "should use UseTLAB"); - - // Try allocating from an existing TLAB. - HeapWord* mem = mem_allocate_inside_tlab_fast(); - if (mem != nullptr) { - return mem; - } - - // Try refilling the TLAB and allocating the object in it. - return mem_allocate_inside_tlab_slow(allocation); -} - HeapWord* MemAllocator::mem_allocate_inside_tlab_fast() const { return _thread->tlab().allocate(_word_size); } @@ -331,7 +318,6 @@ HeapWord* MemAllocator::mem_allocate_inside_tlab_slow(Allocation& allocation) co return mem; } - HeapWord* MemAllocator::mem_allocate_slow(Allocation& allocation) const { // Allocation of an oop can always invoke a safepoint. debug_only(allocation._thread->check_for_valid_safepoint_state()); diff --git a/src/hotspot/share/gc/shared/memAllocator.hpp b/src/hotspot/share/gc/shared/memAllocator.hpp index bd4ae04babf..dca1add31b6 100644 --- a/src/hotspot/share/gc/shared/memAllocator.hpp +++ b/src/hotspot/share/gc/shared/memAllocator.hpp @@ -47,7 +47,6 @@ protected: private: // Allocate in a TLAB. Could allocate a new TLAB, and therefore potentially safepoint. - HeapWord* mem_allocate_inside_tlab(Allocation& allocation) const; HeapWord* mem_allocate_inside_tlab_slow(Allocation& allocation) const; // Allocate outside a TLAB. Could safepoint.