8209126: ZGC: ZMarkStackAllocator::is_initialized() never called
authorpliden
Thu, 09 Aug 2018 11:24:30 +0200
changeset 51345 31b0e90ddbf0
parent 51344 7504e7937183
child 51346 d98f2adf09c9
8209126: ZGC: ZMarkStackAllocator::is_initialized() never called Reviewed-by: eosterlund, tschatzl
src/hotspot/share/gc/z/zHeap.cpp
src/hotspot/share/gc/z/zMark.cpp
src/hotspot/share/gc/z/zMark.hpp
--- a/src/hotspot/share/gc/z/zHeap.cpp	Thu Aug 09 11:24:30 2018 +0200
+++ b/src/hotspot/share/gc/z/zHeap.cpp	Thu Aug 09 11:24:30 2018 +0200
@@ -96,7 +96,7 @@
 }
 
 bool ZHeap::is_initialized() const {
-  return _page_allocator.is_initialized();
+  return _page_allocator.is_initialized() && _mark.is_initialized();
 }
 
 size_t ZHeap::min_capacity() const {
--- a/src/hotspot/share/gc/z/zMark.cpp	Thu Aug 09 11:24:30 2018 +0200
+++ b/src/hotspot/share/gc/z/zMark.cpp	Thu Aug 09 11:24:30 2018 +0200
@@ -70,6 +70,10 @@
     _ncontinue(0),
     _nworkers(0) {}
 
+bool ZMark::is_initialized() const {
+  return _allocator.is_initialized();
+}
+
 size_t ZMark::calculate_nstripes(uint nworkers) const {
   // Calculate the number of stripes from the number of workers we use,
   // where the number of stripes must be a power of two and we want to
--- a/src/hotspot/share/gc/z/zMark.hpp	Thu Aug 09 11:24:30 2018 +0200
+++ b/src/hotspot/share/gc/z/zMark.hpp	Thu Aug 09 11:24:30 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -102,6 +102,8 @@
 public:
   ZMark(ZWorkers* workers, ZPageTable* pagetable);
 
+  bool is_initialized() const;
+
   template <bool finalizable, bool publish> void mark_object(uintptr_t addr);
 
   void start();