From b07e1531b375b9d8117e218355e70272e27e1225 Mon Sep 17 00:00:00 2001 From: Guoxiong Li Date: Tue, 23 Apr 2024 15:22:17 +0000 Subject: [PATCH] 8330362: G1: Inline offset array element accessor in G1BlockOffsetTable Reviewed-by: ayang, tschatzl --- src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp | 7 +------ src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp b/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp index bc14730594d22..ff66c2af4090b 100644 --- a/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp +++ b/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp @@ -43,17 +43,12 @@ G1BlockOffsetTable::G1BlockOffsetTable(MemRegion heap, G1RegionToSpaceMapper* st p2i(bot_reserved.start()), bot_reserved.byte_size(), p2i(bot_reserved.end())); } -void G1BlockOffsetTable::set_offset_array_raw(uint8_t* addr, uint8_t offset) { - Atomic::store(addr, offset); -} - void G1BlockOffsetTable::set_offset_array(uint8_t* addr, uint8_t offset) { check_address(addr, "Block offset table address out of range"); - set_offset_array_raw(addr, offset); + Atomic::store(addr, offset); } void G1BlockOffsetTable::set_offset_array(uint8_t* addr, HeapWord* high, HeapWord* low) { - check_address(addr, "Block offset table address out of range"); assert(high >= low, "addresses out of order"); size_t offset = pointer_delta(high, low); check_offset(offset, "offset too large"); diff --git a/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp b/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp index a0e6129f1a099..4b254c7e42a5f 100644 --- a/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp +++ b/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp @@ -56,7 +56,6 @@ class G1BlockOffsetTable: public CHeapObj { // For performance these have to devolve to array accesses in product builds. inline uint8_t offset_array(uint8_t* addr) const; - inline void set_offset_array_raw(uint8_t* addr, uint8_t offset); inline void set_offset_array(uint8_t* addr, uint8_t offset); inline void set_offset_array(uint8_t* addr, HeapWord* high, HeapWord* low);