提交 050abe1d 编写于 作者: A andrew

Merge

......@@ -1268,3 +1268,5 @@ af43bab3c5d022f0e0b7890f732d8b365b4364cc jdk8u222-b03
d690709cc3398f8cfd6ffebb89a229105fb3e69a jdk8u222-b04
1ec20e8a3d8a7a29e9113b14567abec9f0240e9d jdk8u222-b05
17778f8991c83d794897f05210dce2d2a7b4eb2d jdk8u222-b06
75f4e02f1113bc353fc60df7330dd5456efc49a3 jdk8u222-b07
36a743eee6721b423b7c21a3ba28ac8d906a5386 jdk8u222-b08
......@@ -447,8 +447,6 @@ G1BlockOffsetArrayContigSpace(G1BlockOffsetSharedArray* array,
}
HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold_raw() {
assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
"just checking");
_next_offset_index = _array->index_for_raw(_bottom);
_next_offset_index++;
_next_offset_threshold =
......@@ -457,8 +455,6 @@ HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold_raw() {
}
void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() {
assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
"just checking");
size_t bottom_index = _array->index_for_raw(_bottom);
assert(_array->address_for_index_raw(bottom_index) == _bottom,
"Precondition of call");
......@@ -466,8 +462,6 @@ void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() {
}
HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() {
assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
"just checking");
_next_offset_index = _array->index_for(_bottom);
_next_offset_index++;
_next_offset_threshold =
......
......@@ -145,7 +145,7 @@ private:
// Array for keeping offsets for retrieving object start fast given an
// address.
u_char* _offset_array; // byte array keeping backwards offsets
volatile u_char* _offset_array; // byte array keeping backwards offsets
void check_offset(size_t offset, const char* msg) const {
assert(offset <= N_words,
......@@ -158,9 +158,7 @@ private:
// For performance these have to devolve to array accesses in product builds.
inline u_char offset_array(size_t index) const;
void set_offset_array_raw(size_t index, u_char offset) {
_offset_array[index] = offset;
}
inline void set_offset_array_raw(size_t index, u_char offset);
inline void set_offset_array(size_t index, u_char offset);
......
......@@ -63,6 +63,10 @@ u_char G1BlockOffsetSharedArray::offset_array(size_t index) const {
return _offset_array[index];
}
inline void G1BlockOffsetSharedArray::set_offset_array_raw(size_t index, u_char offset) {
_offset_array[index] = offset;
}
void G1BlockOffsetSharedArray::set_offset_array(size_t index, u_char offset) {
check_index(index, "index out of range");
set_offset_array_raw(index, offset);
......@@ -81,7 +85,7 @@ void G1BlockOffsetSharedArray::set_offset_array(size_t left, size_t right, u_cha
assert(left <= right, "indexes out of order");
size_t num_cards = right - left + 1;
if (UseMemSetInBOT) {
memset(&_offset_array[left], offset, num_cards);
memset(const_cast<u_char*> (&_offset_array[left]), offset, num_cards);
} else {
size_t i = left;
const size_t end = i + num_cards;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册