8330362: G1: Inline offset array element accessor in G1BlockOffsetTable

Reviewed-by: ayang, tschatzl
This commit is contained in:
Guoxiong Li 2024-04-23 15:22:17 +00:00
parent b6518a5db0
commit b07e1531b3
2 changed files with 2 additions and 8 deletions

View File

@ -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) {
void G1BlockOffsetTable::set_offset_array(uint8_t* addr, uint8_t offset) {
check_address(addr, "Block offset table address out of range");
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);
}
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");

View File

@ -56,7 +56,6 @@ private:
// 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);