Merge
authordavid
Tue, 13 Oct 2015 17:34:28 +0200
changeset 33206 da8c3575c076
parent 33204 b8a3901ac5b3 (current diff)
parent 33205 bc9fec5e7656 (diff)
child 33207 edc4431940b2
child 33209 43d7a2139756
Merge
hotspot/src/share/vm/gc/shared/watermark.hpp
--- a/hotspot/src/share/vm/gc/g1/heapRegion.hpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.hpp	Tue Oct 13 17:34:28 2015 +0200
@@ -31,7 +31,6 @@
 #include "gc/g1/survRateGroup.hpp"
 #include "gc/shared/ageTable.hpp"
 #include "gc/shared/spaceDecorator.hpp"
-#include "gc/shared/watermark.hpp"
 #include "utilities/macros.hpp"
 
 // A HeapRegion is the smallest piece of a G1CollectedHeap that
--- a/hotspot/src/share/vm/gc/shared/generation.hpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/generation.hpp	Tue Oct 13 17:34:28 2015 +0200
@@ -27,7 +27,6 @@
 
 #include "gc/shared/collectorCounters.hpp"
 #include "gc/shared/referenceProcessor.hpp"
-#include "gc/shared/watermark.hpp"
 #include "memory/allocation.hpp"
 #include "memory/memRegion.hpp"
 #include "memory/universe.hpp"
--- a/hotspot/src/share/vm/gc/shared/space.cpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/space.cpp	Tue Oct 13 17:34:28 2015 +0200
@@ -529,8 +529,7 @@
 
 void ContiguousSpace::object_iterate(ObjectClosure* blk) {
   if (is_empty()) return;
-  WaterMark bm = bottom_mark();
-  object_iterate_from(bm, blk);
+  object_iterate_from(bottom(), blk);
 }
 
 // For a ContiguousSpace object_iterate() and safe_object_iterate()
@@ -539,12 +538,10 @@
   object_iterate(blk);
 }
 
-void ContiguousSpace::object_iterate_from(WaterMark mark, ObjectClosure* blk) {
-  assert(mark.space() == this, "Mark does not match space");
-  HeapWord* p = mark.point();
-  while (p < top()) {
-    blk->do_object(oop(p));
-    p += oop(p)->size();
+void ContiguousSpace::object_iterate_from(HeapWord* mark, ObjectClosure* blk) {
+  while (mark < top()) {
+    blk->do_object(oop(mark));
+    mark += oop(mark)->size();
   }
 }
 
--- a/hotspot/src/share/vm/gc/shared/space.hpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/space.hpp	Tue Oct 13 17:34:28 2015 +0200
@@ -27,7 +27,6 @@
 
 #include "gc/shared/blockOffsetTable.hpp"
 #include "gc/shared/cardTableModRefBS.hpp"
-#include "gc/shared/watermark.hpp"
 #include "gc/shared/workgroup.hpp"
 #include "memory/allocation.hpp"
 #include "memory/iterator.hpp"
@@ -541,9 +540,6 @@
   void set_saved_mark()            { _saved_mark_word = top();    }
   void reset_saved_mark()          { _saved_mark_word = bottom(); }
 
-  WaterMark bottom_mark()     { return WaterMark(this, bottom()); }
-  WaterMark top_mark()        { return WaterMark(this, top()); }
-  WaterMark saved_mark()      { return WaterMark(this, saved_mark_word()); }
   bool saved_mark_at_top() const { return saved_mark_word() == top(); }
 
   // In debug mode mangle (write it with a particular bit
@@ -649,7 +645,7 @@
   // Same as object_iterate, but starting from "mark", which is required
   // to denote the start of an object.  Objects allocated by
   // applications of the closure *are* included in the iteration.
-  virtual void object_iterate_from(WaterMark mark, ObjectClosure* blk);
+  virtual void object_iterate_from(HeapWord* mark, ObjectClosure* blk);
 
   // Very inefficient implementation.
   virtual HeapWord* block_start_const(const void* p) const;
--- a/hotspot/src/share/vm/gc/shared/watermark.hpp	Tue Oct 13 14:49:13 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_GC_SHARED_WATERMARK_HPP
-#define SHARE_VM_GC_SHARED_WATERMARK_HPP
-
-#include "memory/allocation.hpp"
-#include "utilities/globalDefinitions.hpp"
-
-// A water mark points into a space and is used during GC to keep track of
-// progress.
-
-class Space;
-
-class WaterMark VALUE_OBJ_CLASS_SPEC {
-  friend class VMStructs;
- private:
-  HeapWord* _point;
-  Space*    _space;
- public:
-  // Accessors
-  Space* space() const        { return _space;  }
-  void set_space(Space* s)    { _space = s;     }
-  HeapWord* point() const     { return _point;  }
-  void set_point(HeapWord* p) { _point = p;     }
-
-  // Constructors
-  WaterMark(Space* s, HeapWord* p) : _space(s), _point(p) {};
-  WaterMark() : _space(NULL), _point(NULL) {};
-};
-
-inline bool operator==(const WaterMark& x, const WaterMark& y) {
-  return (x.point() == y.point()) && (x.space() == y.space());
-}
-
-inline bool operator!=(const WaterMark& x, const WaterMark& y) {
-  return !(x == y);
-}
-
-#endif // SHARE_VM_GC_SHARED_WATERMARK_HPP
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Tue Oct 13 17:34:28 2015 +0200
@@ -111,7 +111,6 @@
 # include "gc/shared/spaceDecorator.hpp"
 # include "gc/shared/taskqueue.hpp"
 # include "gc/shared/threadLocalAllocBuffer.hpp"
-# include "gc/shared/watermark.hpp"
 # include "gc/shared/workgroup.hpp"
 # include "interpreter/abstractInterpreter.hpp"
 # include "interpreter/bytecode.hpp"
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Tue Oct 13 14:49:13 2015 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Tue Oct 13 17:34:28 2015 +0200
@@ -55,7 +55,6 @@
 #include "gc/shared/generation.hpp"
 #include "gc/shared/generationSpec.hpp"
 #include "gc/shared/space.hpp"
-#include "gc/shared/watermark.hpp"
 #include "interpreter/bytecodeInterpreter.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "interpreter/interpreter.hpp"
@@ -593,8 +592,6 @@
   nonstatic_field(VirtualSpace,                _lower_high,                                   char*)                                 \
   nonstatic_field(VirtualSpace,                _middle_high,                                  char*)                                 \
   nonstatic_field(VirtualSpace,                _upper_high,                                   char*)                                 \
-  nonstatic_field(WaterMark,                   _point,                                        HeapWord*)                             \
-  nonstatic_field(WaterMark,                   _space,                                        Space*)                                \
                                                                                                                                      \
   /************************/                                                                                                         \
   /* PerfMemory - jvmstat */                                                                                                         \
@@ -1545,7 +1542,6 @@
   declare_toplevel_type(MemRegion)                                        \
   declare_toplevel_type(ThreadLocalAllocBuffer)                           \
   declare_toplevel_type(VirtualSpace)                                     \
-  declare_toplevel_type(WaterMark)                                        \
   declare_toplevel_type(ObjPtrQueue)                                      \
   declare_toplevel_type(DirtyCardQueue)                                   \
                                                                           \