changeset 9012:adaa0f3c6c59

Merge
author andrew
date Sat, 06 Jul 2019 19:18:57 +0100
parents e0e66aba375a 9deea71d83dd
children 23845b8c4b4b
files
diffstat 4 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Feb 19 08:58:55 2019 +0100
+++ b/.hgtags	Sat Jul 06 19:18:57 2019 +0100
@@ -1268,3 +1268,5 @@
 d690709cc3398f8cfd6ffebb89a229105fb3e69a jdk8u222-b04
 1ec20e8a3d8a7a29e9113b14567abec9f0240e9d jdk8u222-b05
 17778f8991c83d794897f05210dce2d2a7b4eb2d jdk8u222-b06
+75f4e02f1113bc353fc60df7330dd5456efc49a3 jdk8u222-b07
+36a743eee6721b423b7c21a3ba28ac8d906a5386 jdk8u222-b08
--- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Tue Feb 19 08:58:55 2019 +0100
+++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Sat Jul 06 19:18:57 2019 +0100
@@ -447,8 +447,6 @@
 }
 
 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 @@
 }
 
 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 @@
 }
 
 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 =
--- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp	Tue Feb 19 08:58:55 2019 +0100
+++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp	Sat Jul 06 19:18:57 2019 +0100
@@ -145,7 +145,7 @@
 
   // 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 @@
   // 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);
 
--- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp	Tue Feb 19 08:58:55 2019 +0100
+++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp	Sat Jul 06 19:18:57 2019 +0100
@@ -63,6 +63,10 @@
   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 @@
   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;