From 2b04aee2def2610d5150ad202f8db64b5bd4621c Mon Sep 17 00:00:00 2001 From: Guoxiong Li Date: Tue, 16 Apr 2024 20:28:28 +0800 Subject: [PATCH] JDK-8330339 --- src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp b/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp index 518c595b22520..4ee3904563aca 100644 --- a/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp +++ b/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp @@ -66,6 +66,12 @@ class G1BlockOffsetTable: public CHeapObj { inline void set_offset_array(uint8_t* left, uint8_t* right, uint8_t offset); + // Mapping from address to object start array entry + uint8_t* entry_for_addr(const void* const p) const; + + // Mapping from object start array entry to address of first word + HeapWord* addr_for_entry(const uint8_t* const p) const; + void check_address(uint8_t* addr, const char* msg) const NOT_DEBUG_RETURN; // Sets the entries corresponding to the cards starting at "start" and ending @@ -77,6 +83,9 @@ class G1BlockOffsetTable: public CHeapObj { void check_all_cards(uint8_t* left_card, uint8_t* right_card) const NOT_DEBUG_RETURN; + void verify_offset(uint8_t* card_index, uint8_t upper) const NOT_DEBUG_RETURN; + void verify_for_block(HeapWord* blk_start, HeapWord* blk_end) const NOT_DEBUG_RETURN; + static HeapWord* align_up_by_card_size(HeapWord* const addr) { return align_up(addr, CardTable::card_size()); } @@ -99,12 +108,6 @@ class G1BlockOffsetTable: public CHeapObj { // in the heap parameter. G1BlockOffsetTable(MemRegion heap, G1RegionToSpaceMapper* storage); - // Mapping from address to object start array entry - uint8_t* entry_for_addr(const void* const p) const; - - // Mapping from object start array entry to address of first word - HeapWord* addr_for_entry(const uint8_t* const p) const; - static bool is_crossing_card_boundary(HeapWord* const obj_start, HeapWord* const obj_end) { HeapWord* cur_card_boundary = align_up_by_card_size(obj_start); @@ -112,9 +115,6 @@ class G1BlockOffsetTable: public CHeapObj { return obj_end > cur_card_boundary; } - void verify_offset(uint8_t* card_index, uint8_t upper) const NOT_DEBUG_RETURN; - void verify_for_block(HeapWord* blk_start, HeapWord* blk_end) const NOT_DEBUG_RETURN; - // Returns the address of the start of the block reaching into the card containing // "addr". inline HeapWord* block_start_reaching_into_card(const void* addr) const;