8073387: Move VerifyOopClosures out from genOopClosures.hpp
authorstefank
Wed, 18 Feb 2015 08:57:29 +0100
changeset 29084 1b732f2836ce
parent 29083 5e7bce2712ac
child 29085 7b01b134b727
child 29199 db7ae483ecb2
8073387: Move VerifyOopClosures out from genOopClosures.hpp Reviewed-by: brutisso, mgerdin, coleenp
hotspot/src/share/vm/code/codeCache.cpp
hotspot/src/share/vm/memory/genOopClosures.hpp
hotspot/src/share/vm/oops/oop.cpp
hotspot/src/share/vm/oops/verifyOopClosure.hpp
hotspot/src/share/vm/runtime/deoptimization.cpp
hotspot/src/share/vm/runtime/frame.cpp
hotspot/src/share/vm/runtime/thread.cpp
hotspot/src/share/vm/runtime/vmThread.cpp
--- a/hotspot/src/share/vm/code/codeCache.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -39,6 +39,7 @@
 #include "oops/method.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/icache.hpp"
--- a/hotspot/src/share/vm/memory/genOopClosures.hpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/memory/genOopClosures.hpp	Wed Feb 18 08:57:29 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -189,16 +189,4 @@
   inline void do_oop_nv(narrowOop* p);
 };
 
-class VerifyOopClosure: public OopClosure {
- protected:
-  template <class T> inline void do_oop_work(T* p) {
-    oop obj = oopDesc::load_decode_heap_oop(p);
-    guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj)));
-  }
- public:
-  virtual void do_oop(oop* p);
-  virtual void do_oop(narrowOop* p);
-  static VerifyOopClosure verify_oop;
-};
-
 #endif // SHARE_VM_MEMORY_GENOOPCLOSURES_HPP
--- a/hotspot/src/share/vm/oops/oop.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/oops/oop.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -26,6 +26,7 @@
 #include "classfile/altHashing.hpp"
 #include "classfile/javaClasses.inline.hpp"
 #include "oops/oop.inline.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "utilities/copy.hpp"
@@ -120,6 +121,11 @@
 
 VerifyOopClosure VerifyOopClosure::verify_oop;
 
+template <class T> void VerifyOopClosure::do_oop_work(T* p) {
+  oop obj = oopDesc::load_decode_heap_oop(p);
+  guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj)));
+}
+
 void VerifyOopClosure::do_oop(oop* p)       { VerifyOopClosure::do_oop_work(p); }
 void VerifyOopClosure::do_oop(narrowOop* p) { VerifyOopClosure::do_oop_work(p); }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/oops/verifyOopClosure.hpp	Wed Feb 18 08:57:29 2015 +0100
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 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_OOPS_VERIFYOOPCLOSURE_HPP
+#define SHARE_VM_OOPS_VERIFYOOPCLOSURE_HPP
+
+#include "memory/iterator.hpp"
+
+class VerifyOopClosure: public OopClosure {
+ protected:
+  template <class T> void do_oop_work(T* p);
+ public:
+  virtual void do_oop(oop* p);
+  virtual void do_oop(narrowOop* p);
+  static VerifyOopClosure verify_oop;
+};
+
+#endif // SHARE_VM_OOPS_VERIFYOOPCLOSURE_HPP
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -37,6 +37,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
--- a/hotspot/src/share/vm/runtime/frame.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/runtime/frame.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -36,6 +36,7 @@
 #include "oops/methodData.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
--- a/hotspot/src/share/vm/runtime/thread.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -42,6 +42,7 @@
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "prims/jvm_misc.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Mon Feb 16 21:24:39 2015 +0100
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Wed Feb 18 08:57:29 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -28,6 +28,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
+#include "oops/verifyOopClosure.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/os.hpp"