src/hotspot/share/runtime/mutex.hpp
changeset 52555 3b2d22602c16
parent 50280 5aaf3a471172
child 52913 bf2f2560dd53
--- a/src/hotspot/share/runtime/mutex.hpp	Wed Nov 14 14:23:21 2018 +0000
+++ b/src/hotspot/share/runtime/mutex.hpp	Wed Nov 14 09:50:01 2018 -0500
@@ -135,12 +135,12 @@
   // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode)
 #ifndef PRODUCT
   bool      _allow_vm_block;
-  debug_only(int _rank;)                 // rank (to avoid/detect potential deadlocks)
-  debug_only(Monitor * _next;)           // Used by a Thread to link up owned locks
-  debug_only(Thread* _last_owner;)       // the last thread to own the lock
-  debug_only(static bool contains(Monitor * locks, Monitor * lock);)
-  debug_only(static Monitor * get_least_ranked_lock(Monitor * locks);)
-  debug_only(Monitor * get_least_ranked_lock_besides_this(Monitor * locks);)
+  DEBUG_ONLY(int _rank;)                 // rank (to avoid/detect potential deadlocks)
+  DEBUG_ONLY(Monitor * _next;)           // Used by a Thread to link up owned locks
+  DEBUG_ONLY(Thread* _last_owner;)       // the last thread to own the lock
+  DEBUG_ONLY(static bool contains(Monitor * locks, Monitor * lock);)
+  DEBUG_ONLY(static Monitor * get_least_ranked_lock(Monitor * locks);)
+  DEBUG_ONLY(Monitor * get_least_ranked_lock_besides_this(Monitor * locks);)
 #endif
 
   void set_owner_implementation(Thread* owner)                        PRODUCT_RETURN;
@@ -237,17 +237,17 @@
   #ifndef PRODUCT
     void print_on(outputStream* st) const;
     void print() const                      { print_on(tty); }
-    debug_only(int    rank() const          { return _rank; })
+    DEBUG_ONLY(int    rank() const          { return _rank; })
     bool   allow_vm_block()                 { return _allow_vm_block; }
 
-    debug_only(Monitor *next()  const         { return _next; })
-    debug_only(void   set_next(Monitor *next) { _next = next; })
+    DEBUG_ONLY(Monitor *next()  const         { return _next; })
+    DEBUG_ONLY(void   set_next(Monitor *next) { _next = next; })
   #endif
 
   void set_owner(Thread* owner) {
   #ifndef PRODUCT
     set_owner_implementation(owner);
-    debug_only(void verify_Monitor(Thread* thr));
+    DEBUG_ONLY(void verify_Monitor(Thread* thr);)
   #else
     _owner = owner;
   #endif