8231270: ZGC: Remove ZAddressSpace* and ZAddressReserved*
authorpliden
Tue, 24 Sep 2019 17:08:19 +0200
changeset 58294 872465abbfe3
parent 58293 f2bd6a3993a7
child 58295 7973073dd048
8231270: ZGC: Remove ZAddressSpace* and ZAddressReserved* Reviewed-by: stefank, eosterlund
src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp
src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp
src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp
src/hotspot/cpu/x86/gc/z/zGlobals_x86.hpp
src/hotspot/share/gc/z/vmStructs_z.hpp
src/hotspot/share/gc/z/zAddress.cpp
src/hotspot/share/gc/z/zCollectedHeap.cpp
src/hotspot/share/gc/z/zDebug.gdb
src/hotspot/share/gc/z/zGlobals.cpp
src/hotspot/share/gc/z/zGlobals.hpp
--- a/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp	Tue Sep 24 17:08:19 2019 +0200
@@ -135,26 +135,6 @@
 //  * 63-48 Fixed (16-bits, always zero)
 //
 
-uintptr_t ZPlatformAddressSpaceStart() {
-  const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
-  const size_t min_address_offset = 0;
-  return first_heap_view_address + min_address_offset;
-}
-
-uintptr_t ZPlatformAddressSpaceEnd() {
-  const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
-  const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
-  return last_heap_view_address + max_address_offset;
-}
-
-uintptr_t ZPlatformAddressReservedStart() {
-  return ZPlatformAddressSpaceStart();
-}
-
-uintptr_t ZPlatformAddressReservedEnd() {
-  return ZPlatformAddressSpaceEnd();
-}
-
 uintptr_t ZPlatformAddressBase() {
   return 0;
 }
--- a/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp	Tue Sep 24 17:08:19 2019 +0200
@@ -40,10 +40,6 @@
 const size_t ZPlatformNMethodDisarmedOffset = 4;
 const size_t ZPlatformCacheLineSize         = 64;
 
-uintptr_t    ZPlatformAddressSpaceStart();
-uintptr_t    ZPlatformAddressSpaceEnd();
-uintptr_t    ZPlatformAddressReservedStart();
-uintptr_t    ZPlatformAddressReservedEnd();
 uintptr_t    ZPlatformAddressBase();
 size_t       ZPlatformAddressOffsetBits();
 size_t       ZPlatformAddressMetadataShift();
--- a/src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp	Tue Sep 24 17:08:19 2019 +0200
@@ -135,26 +135,6 @@
 //  * 63-48 Fixed (16-bits, always zero)
 //
 
-uintptr_t ZPlatformAddressSpaceStart() {
-  const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
-  const size_t min_address_offset = 0;
-  return first_heap_view_address + min_address_offset;
-}
-
-uintptr_t ZPlatformAddressSpaceEnd() {
-  const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
-  const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
-  return last_heap_view_address + max_address_offset;
-}
-
-uintptr_t ZPlatformAddressReservedStart() {
-  return ZPlatformAddressSpaceStart();
-}
-
-uintptr_t ZPlatformAddressReservedEnd() {
-  return ZPlatformAddressSpaceEnd();
-}
-
 uintptr_t ZPlatformAddressBase() {
   return 0;
 }
--- a/src/hotspot/cpu/x86/gc/z/zGlobals_x86.hpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/cpu/x86/gc/z/zGlobals_x86.hpp	Tue Sep 24 17:08:19 2019 +0200
@@ -40,10 +40,6 @@
 const size_t ZPlatformNMethodDisarmedOffset = 4;
 const size_t ZPlatformCacheLineSize         = 64;
 
-uintptr_t    ZPlatformAddressSpaceStart();
-uintptr_t    ZPlatformAddressSpaceEnd();
-uintptr_t    ZPlatformAddressReservedStart();
-uintptr_t    ZPlatformAddressReservedEnd();
 uintptr_t    ZPlatformAddressBase();
 size_t       ZPlatformAddressOffsetBits();
 size_t       ZPlatformAddressMetadataShift();
--- a/src/hotspot/share/gc/z/vmStructs_z.hpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/vmStructs_z.hpp	Tue Sep 24 17:08:19 2019 +0200
@@ -104,8 +104,7 @@
   declare_constant(ZAddressOffsetShift)                                                              \
   declare_constant(ZAddressOffsetBits)                                                               \
   declare_constant(ZAddressOffsetMask)                                                               \
-  declare_constant(ZAddressOffsetMax)                                                                \
-  declare_constant(ZAddressSpaceStart)
+  declare_constant(ZAddressOffsetMax)
 
 #define VM_TYPES_ZGC(declare_type, declare_toplevel_type, declare_integer_type)                      \
   declare_toplevel_type(ZGlobalsForVMStructs)                                                        \
--- a/src/hotspot/share/gc/z/zAddress.cpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/zAddress.cpp	Tue Sep 24 17:08:19 2019 +0200
@@ -32,14 +32,6 @@
 }
 
 void ZAddress::initialize() {
-  ZAddressSpaceStart = ZPlatformAddressSpaceStart();
-  ZAddressSpaceEnd = ZPlatformAddressSpaceEnd();
-  ZAddressSpaceSize = ZAddressSpaceEnd - ZAddressSpaceStart;
-
-  ZAddressReservedStart = ZPlatformAddressReservedStart();
-  ZAddressReservedEnd = ZPlatformAddressReservedEnd();
-  ZAddressReservedSize = ZAddressReservedEnd - ZAddressReservedStart;
-
   ZAddressBase = ZPlatformAddressBase();
 
   ZAddressOffsetBits = ZPlatformAddressOffsetBits();
--- a/src/hotspot/share/gc/z/zCollectedHeap.cpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/zCollectedHeap.cpp	Tue Sep 24 17:08:19 2019 +0200
@@ -68,8 +68,7 @@
     return JNI_ENOMEM;
   }
 
-  Universe::calculate_verify_data((HeapWord*)ZAddressReservedStart,
-                                  (HeapWord*)ZAddressReservedEnd);
+  Universe::calculate_verify_data((HeapWord*)0, (HeapWord*)UINTPTR_MAX);
 
   return JNI_OK;
 }
@@ -285,12 +284,7 @@
 }
 
 VirtualSpaceSummary ZCollectedHeap::create_heap_space_summary() {
-  const size_t capacity_in_words = capacity() / HeapWordSize;
-  const size_t max_capacity_in_words = max_capacity() / HeapWordSize;
-  HeapWord* const heap_start = (HeapWord*)ZAddressReservedStart;
-  return VirtualSpaceSummary(heap_start,
-                             heap_start + capacity_in_words,
-                             heap_start + max_capacity_in_words);
+  return VirtualSpaceSummary((HeapWord*)0, (HeapWord*)capacity(), (HeapWord*)max_capacity());
 }
 
 void ZCollectedHeap::safepoint_synchronize_begin() {
@@ -312,10 +306,6 @@
 void ZCollectedHeap::print_on_error(outputStream* st) const {
   CollectedHeap::print_on_error(st);
 
-  st->print_cr("Address Space");
-  st->print_cr( "     Start:             " PTR_FORMAT, ZAddressSpaceStart);
-  st->print_cr( "     End:               " PTR_FORMAT, ZAddressSpaceEnd);
-  st->print_cr( "     Size:              " SIZE_FORMAT_W(-15) " (" PTR_FORMAT ")", ZAddressSpaceSize, ZAddressSpaceSize);
   st->print_cr( "Heap");
   st->print_cr( "     GlobalPhase:       %u", ZGlobalPhase);
   st->print_cr( "     GlobalSeqNum:      %u", ZGlobalSeqNum);
--- a/src/hotspot/share/gc/z/zDebug.gdb	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/zDebug.gdb	Tue Sep 24 17:08:19 2019 +0200
@@ -126,10 +126,6 @@
 
 # Print heap information
 define zph
-    printf "Address Space\n"
-    printf "     Start:             0x%llx\n", ZAddressSpaceStart
-    printf "     End:               0x%llx\n", ZAddressSpaceEnd
-    printf "     Size:              %-15llu (0x%llx)\n", ZAddressSpaceSize, ZAddressSpaceSize
     printf "Heap\n"
     printf "     GlobalPhase:       %u\n", ZGlobalPhase
     printf "     GlobalSeqNum:      %u\n", ZGlobalSeqNum
--- a/src/hotspot/share/gc/z/zGlobals.cpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/zGlobals.cpp	Tue Sep 24 17:08:19 2019 +0200
@@ -48,11 +48,3 @@
 uintptr_t ZAddressMetadataMarked1;
 uintptr_t ZAddressMetadataRemapped;
 uintptr_t ZAddressMetadataFinalizable;
-
-uintptr_t ZAddressSpaceStart;
-uintptr_t ZAddressSpaceEnd;
-size_t    ZAddressSpaceSize;
-
-uintptr_t ZAddressReservedStart;
-uintptr_t ZAddressReservedEnd;
-size_t    ZAddressReservedSize;
--- a/src/hotspot/share/gc/z/zGlobals.hpp	Tue Sep 24 17:08:18 2019 +0200
+++ b/src/hotspot/share/gc/z/zGlobals.hpp	Tue Sep 24 17:08:19 2019 +0200
@@ -112,16 +112,6 @@
 extern uintptr_t  ZAddressMetadataRemapped;
 extern uintptr_t  ZAddressMetadataFinalizable;
 
-// Address space start/end/size
-extern uintptr_t  ZAddressSpaceStart;
-extern uintptr_t  ZAddressSpaceEnd;
-extern size_t     ZAddressSpaceSize;
-
-// Reserved space start/end
-extern uintptr_t  ZAddressReservedStart;
-extern uintptr_t  ZAddressReservedEnd;
-extern size_t     ZAddressReservedSize;
-
 // NMethod entry barrier
 const size_t      ZNMethodDisarmedOffset        = ZPlatformNMethodDisarmedOffset;