< prev index next >

src/hotspot/share/runtime/objectMonitor.hpp

Print this page
rev 60025 : 8246476: remove AsyncDeflateIdleMonitors option and the safepoint based deflation mechanism

@@ -173,11 +173,11 @@
   volatile int _SpinDuration;
 
   jint  _contentions;               // Number of active contentions in enter(). It is used by is_busy()
                                     // along with other fields to determine if an ObjectMonitor can be
                                     // deflated. It is also used by the async deflation protocol. See
-                                    // ObjectSynchronizer::deflate_monitor() and deflate_monitor_using_JT().
+                                    // ObjectSynchronizer::deflate_monitor_using_JT().
  protected:
   ObjectWaiter* volatile _WaitSet;  // LL of threads wait()ing on the monitor
   volatile jint  _waiters;          // number of waiting threads
  private:
   volatile int _WaitSetLock;        // protects Wait Queue - simple spinlock

@@ -241,20 +241,16 @@
   void               set_header(markWord hdr);
 
   intptr_t is_busy() const {
     // TODO-FIXME: assert _owner == null implies _recursions = 0
     intptr_t ret_code = _waiters | intptr_t(_cxq) | intptr_t(_EntryList);
-    if (!AsyncDeflateIdleMonitors) {
-      ret_code |= contentions() | intptr_t(_owner);
-    } else {
       if (contentions() > 0) {
         ret_code |= contentions();
       }
       if (_owner != DEFLATER_MARKER) {
         ret_code |= intptr_t(_owner);
       }
-    }
     return ret_code;
   }
   const char* is_busy_to_string(stringStream* ss);
 
   intptr_t  is_entered(Thread* current) const;

@@ -372,17 +368,6 @@
   void      ExitEpilog(Thread* self, ObjectWaiter* Wakee);
   bool      ExitSuspendEquivalent(JavaThread* self);
   void      install_displaced_markword_in_object(const oop obj);
 };
 
-// Macro to use guarantee() for more strict AsyncDeflateIdleMonitors
-// checks and assert() otherwise.
-#define ADIM_guarantee(p, ...)       \
-  do {                               \
-    if (AsyncDeflateIdleMonitors) {  \
-      guarantee(p, __VA_ARGS__);     \
-    } else {                         \
-      assert(p, __VA_ARGS__);        \
-    }                                \
-  } while (0)
-
 #endif // SHARE_RUNTIME_OBJECTMONITOR_HPP
< prev index next >