changeset 57408:1edf6b0baec1

8235748: ZGC: Remove ZAddress::address() Reviewed-by: eosterlund, stefank
author pliden
date Thu, 12 Dec 2019 10:10:37 +0100
parents 9468dada3479
children a67d541d3b07
files 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/zAddress.cpp src/hotspot/share/gc/z/zAddress.inline.hpp src/hotspot/share/gc/z/zGlobals.cpp src/hotspot/share/gc/z/zGlobals.hpp
diffstat 8 files changed, 6 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp	Thu Dec 12 10:10:37 2019 +0100
@@ -135,10 +135,6 @@
 //  * 63-48 Fixed (16-bits, always zero)
 //
 
-uintptr_t ZPlatformAddressBase() {
-  return 0;
-}
-
 size_t ZPlatformAddressOffsetBits() {
   const size_t min_address_offset_bits = 42; // 4TB
   const size_t max_address_offset_bits = 44; // 16TB
--- a/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp	Thu Dec 12 10:10:37 2019 +0100
@@ -29,7 +29,6 @@
 const size_t ZPlatformNMethodDisarmedOffset = 4;
 const size_t ZPlatformCacheLineSize         = 64;
 
-uintptr_t ZPlatformAddressBase();
 size_t ZPlatformAddressOffsetBits();
 size_t ZPlatformAddressMetadataShift();
 
--- a/src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp	Thu Dec 12 10:10:37 2019 +0100
@@ -135,10 +135,6 @@
 //  * 63-48 Fixed (16-bits, always zero)
 //
 
-uintptr_t ZPlatformAddressBase() {
-  return 0;
-}
-
 size_t ZPlatformAddressOffsetBits() {
   const size_t min_address_offset_bits = 42; // 4TB
   const size_t max_address_offset_bits = 44; // 16TB
--- a/src/hotspot/cpu/x86/gc/z/zGlobals_x86.hpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/cpu/x86/gc/z/zGlobals_x86.hpp	Thu Dec 12 10:10:37 2019 +0100
@@ -29,7 +29,6 @@
 const size_t ZPlatformNMethodDisarmedOffset = 4;
 const size_t ZPlatformCacheLineSize         = 64;
 
-uintptr_t ZPlatformAddressBase();
 size_t ZPlatformAddressOffsetBits();
 size_t ZPlatformAddressMetadataShift();
 
--- a/src/hotspot/share/gc/z/zAddress.cpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zAddress.cpp	Thu Dec 12 10:10:37 2019 +0100
@@ -32,8 +32,6 @@
 }
 
 void ZAddress::initialize() {
-  ZAddressBase = ZPlatformAddressBase();
-
   ZAddressOffsetBits = ZPlatformAddressOffsetBits();
   ZAddressOffsetMask = (((uintptr_t)1 << ZAddressOffsetBits) - 1) << ZAddressOffsetShift;
   ZAddressOffsetMax = (uintptr_t)1 << ZAddressOffsetBits;
--- a/src/hotspot/share/gc/z/zAddress.inline.hpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zAddress.inline.hpp	Thu Dec 12 10:10:37 2019 +0100
@@ -96,16 +96,12 @@
   return value & (ZAddressMetadataMask & ~ZAddressMetadataFinalizable);
 }
 
-inline uintptr_t ZAddress::address(uintptr_t value) {
-  return value | ZAddressBase;
-}
-
 inline uintptr_t ZAddress::offset(uintptr_t value) {
   return value & ZAddressOffsetMask;
 }
 
 inline uintptr_t ZAddress::good(uintptr_t value) {
-  return address(offset(value) | ZAddressGoodMask);
+  return offset(value) | ZAddressGoodMask;
 }
 
 inline uintptr_t ZAddress::good_or_null(uintptr_t value) {
@@ -113,23 +109,23 @@
 }
 
 inline uintptr_t ZAddress::finalizable_good(uintptr_t value) {
-  return address(offset(value) | ZAddressMetadataFinalizable | ZAddressGoodMask);
+  return offset(value) | ZAddressMetadataFinalizable | ZAddressGoodMask;
 }
 
 inline uintptr_t ZAddress::marked(uintptr_t value) {
-  return address(offset(value) | ZAddressMetadataMarked);
+  return offset(value) | ZAddressMetadataMarked;
 }
 
 inline uintptr_t ZAddress::marked0(uintptr_t value) {
-  return address(offset(value) | ZAddressMetadataMarked0);
+  return offset(value) | ZAddressMetadataMarked0;
 }
 
 inline uintptr_t ZAddress::marked1(uintptr_t value) {
-  return address(offset(value) | ZAddressMetadataMarked1);
+  return offset(value) | ZAddressMetadataMarked1;
 }
 
 inline uintptr_t ZAddress::remapped(uintptr_t value) {
-  return address(offset(value) | ZAddressMetadataRemapped);
+  return offset(value) | ZAddressMetadataRemapped;
 }
 
 inline uintptr_t ZAddress::remapped_or_null(uintptr_t value) {
--- a/src/hotspot/share/gc/z/zGlobals.cpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zGlobals.cpp	Thu Dec 12 10:10:37 2019 +0100
@@ -42,8 +42,6 @@
 uintptr_t  ZAddressBadMask;
 uintptr_t  ZAddressWeakBadMask;
 
-uintptr_t  ZAddressBase;
-
 size_t     ZAddressOffsetBits;
 uintptr_t  ZAddressOffsetMask;
 size_t     ZAddressOffsetMax;
--- a/src/hotspot/share/gc/z/zGlobals.hpp	Thu Dec 12 10:10:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zGlobals.hpp	Thu Dec 12 10:10:37 2019 +0100
@@ -93,9 +93,6 @@
 extern uintptr_t  ZAddressBadMask;
 extern uintptr_t  ZAddressWeakBadMask;
 
-// Pointer base address
-extern uintptr_t  ZAddressBase;
-
 // Pointer part of address
 extern size_t     ZAddressOffsetBits;
 const  size_t     ZAddressOffsetShift           = 0;