8171848: ObjectMonitor verify() and print() methods are empty
authorkzhaldyb
Wed, 21 Dec 2016 12:47:29 +0300
changeset 46342 c871e0f8b02a
parent 46341 4c676683bdb9
child 46343 3c2650b86bf7
8171848: ObjectMonitor verify() and print() methods are empty Reviewed-by: dholmes
hotspot/src/share/vm/runtime/objectMonitor.cpp
hotspot/src/share/vm/runtime/objectMonitor.hpp
hotspot/src/share/vm/runtime/synchronizer.cpp
hotspot/src/share/vm/runtime/synchronizer.hpp
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Tue Mar 21 11:25:18 2017 -0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Wed Dec 21 12:47:29 2016 +0300
@@ -2445,12 +2445,6 @@
 }
 
 #ifndef PRODUCT
-void ObjectMonitor::verify() {
-}
-
-void ObjectMonitor::print() {
-}
-
 void ObjectMonitor_test() {
   ObjectMonitor::sanity_checks();
 }
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp	Tue Mar 21 11:25:18 2017 -0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp	Wed Dec 21 12:47:29 2016 +0300
@@ -313,10 +313,6 @@
   void      clear();
   static void sanity_checks();  // public for -XX:+ExecuteInternalVMTests
                                 // in PRODUCT for -XX:SyncKnobs=Verbose=1
-#ifndef PRODUCT
-  void      verify();
-  void      print();
-#endif
 
   void      enter(TRAPS);
   void      exit(bool not_suspended, TRAPS);
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp	Tue Mar 21 11:25:18 2017 -0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp	Wed Dec 21 12:47:29 2016 +0300
@@ -1879,23 +1879,6 @@
 
 #ifndef PRODUCT
 
-// Verify all monitors in the monitor cache, the verification is weak.
-void ObjectSynchronizer::verify() {
-  PaddedEnd<ObjectMonitor> * block =
-    (PaddedEnd<ObjectMonitor> *)OrderAccess::load_ptr_acquire(&gBlockList);
-  while (block != NULL) {
-    assert(block->object() == CHAINMARKER, "must be a block header");
-    for (int i = 1; i < _BLOCKSIZE; i++) {
-      ObjectMonitor* mid = (ObjectMonitor *)(block + i);
-      oop object = (oop)mid->object();
-      if (object != NULL) {
-        mid->verify();
-      }
-    }
-    block = (PaddedEnd<ObjectMonitor> *)block->FreeNext;
-  }
-}
-
 // Check if monitor belongs to the monitor cache
 // The list is grow-only so it's *relatively* safe to traverse
 // the list of extant blocks without taking a lock.
--- a/hotspot/src/share/vm/runtime/synchronizer.hpp	Tue Mar 21 11:25:18 2017 -0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.hpp	Wed Dec 21 12:47:29 2016 +0300
@@ -141,7 +141,6 @@
   static void sanity_checks(const bool verbose,
                             const unsigned int cache_line_size,
                             int *error_cnt_ptr, int *warning_cnt_ptr);
-  static void verify() PRODUCT_RETURN;
   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
 
  private: