changeset 55425:eb54b34af2be

8220593: ZGC: Remove superfluous ZPage::is_detached() Reviewed-by: stefank, eosterlund
author pliden
date Mon, 18 Mar 2019 11:50:40 +0100
parents d0d26fc836dd
children 5748eae24183
files src/hotspot/share/gc/z/zHeap.cpp src/hotspot/share/gc/z/zPage.cpp src/hotspot/share/gc/z/zPage.hpp src/hotspot/share/gc/z/zPage.inline.hpp src/hotspot/share/gc/z/zPageCache.cpp
diffstat 5 files changed, 3 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/z/zHeap.cpp	Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zHeap.cpp	Mon Mar 18 11:50:40 2019 +0100
@@ -258,9 +258,7 @@
     // Map all pages
     ZPageTableIterator iter(&_page_table);
     for (ZPage* page; iter.next(&page);) {
-      if (!page->is_detached()) {
-        _page_allocator.map_page(page);
-      }
+      _page_allocator.map_page(page);
     }
   }
 }
--- a/src/hotspot/share/gc/z/zPage.cpp	Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zPage.cpp	Mon Mar 18 11:50:40 2019 +0100
@@ -48,12 +48,11 @@
 
 ZPage::~ZPage() {
   assert(!is_active(), "Should not be active");
-  assert(is_detached(), "Should be detached");
+  assert(_physical.is_null(), "Should be detached");
 }
 
 void ZPage::reset() {
   assert(!is_active(), "Should not be active");
-  assert(!is_detached(), "Should not be detached");
 
   _seqnum = ZGlobalSeqNum;
   _top = start();
@@ -67,11 +66,10 @@
 }
 
 void ZPage::print_on(outputStream* out) const {
-  out->print_cr(" %-6s  " PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT " %s%s%s%s",
+  out->print_cr(" %-6s  " PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT " %s%s%s",
                 type_to_string(), start(), top(), end(),
                 is_allocating()  ? " Allocating"  : "",
                 is_relocatable() ? " Relocatable" : "",
-                is_detached()    ? " Detached"    : "",
                 !is_active()     ? " Inactive"    : "");
 }
 
--- a/src/hotspot/share/gc/z/zPage.hpp	Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zPage.hpp	Mon Mar 18 11:50:40 2019 +0100
@@ -85,7 +85,6 @@
 
   bool is_allocating() const;
   bool is_relocatable() const;
-  bool is_detached() const;
 
   bool is_mapped() const;
   void set_pre_mapped();
--- a/src/hotspot/share/gc/z/zPage.inline.hpp	Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zPage.inline.hpp	Mon Mar 18 11:50:40 2019 +0100
@@ -165,10 +165,6 @@
   return is_active() && _seqnum < ZGlobalSeqNum;
 }
 
-inline bool ZPage::is_detached() const {
-  return _physical.is_null();
-}
-
 inline bool ZPage::is_mapped() const {
   return _seqnum > 0;
 }
--- a/src/hotspot/share/gc/z/zPageCache.cpp	Mon Mar 18 11:50:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zPageCache.cpp	Mon Mar 18 11:50:40 2019 +0100
@@ -119,7 +119,6 @@
 
 void ZPageCache::free_page(ZPage* page) {
   assert(!page->is_active(), "Invalid page state");
-  assert(!page->is_detached(), "Invalid page state");
 
   const uint8_t type = page->type();
   if (type == ZPageTypeSmall) {