--- old/src/hotspot/share/runtime/objectMonitor.hpp 2019-08-28 15:04:00.598957364 -0400 +++ new/src/hotspot/share/runtime/objectMonitor.hpp 2019-08-28 15:04:00.410957371 -0400 @@ -159,19 +159,13 @@ Old } AllocationState; AllocationState _allocation_state; - public: - ObjectMonitor* _next_om; // Next ObjectMonitor* linkage - private: // Separate _header and _owner on different cache lines since both can // have busy multi-threaded access. _header, _object and _allocation_state // are set at initial inflation. _object and _allocation_state don't // change until deflation so _object and _allocation_state are good - // choices to share the cache line with _header. _next_om shares _header's - // cache line for pre-monitor list historical reasons. _next_om only - // changes if the next ObjectMonitor is deflated. + // choices to share the cache line with _header. DEFINE_PAD_MINUS_SIZE(0, OM_CACHE_LINE_SIZE, sizeof(volatile markWord) + - sizeof(void* volatile) + sizeof(AllocationState) + - sizeof(ObjectMonitor*)); + sizeof(void* volatile) + sizeof(AllocationState)); // Used by async deflation as a marker in the _owner field: #define DEFLATER_MARKER reinterpret_cast(-1) protected: // protected for JvmtiRawMonitor @@ -186,6 +180,12 @@ sizeof(volatile jlong)); volatile jint _ref_count; // ref count for ObjectMonitor* and used by the async deflation // protocol. See ObjectSynchronizer::deflate_monitor_using_JT(). + private: + // Separate _ref_count and _next_om on different cache lines since + // both can have busy multi-threaded access. + DEFINE_PAD_MINUS_SIZE(2, OM_CACHE_LINE_SIZE, sizeof(volatile jint)); + public: // for static synchronizer.cpp access: + ObjectMonitor* volatile _next_om; // Next ObjectMonitor* linkage protected: // protected for JvmtiRawMonitor volatile intptr_t _recursions; // recursion count, 0 for first entry ObjectWaiter* volatile _EntryList; // Threads blocked on entry or reentry. @@ -210,6 +210,7 @@ volatile int _WaitSetLock; // protects Wait Queue - simple spinlock public: + volatile int visit_marker; static void Initialize(); // Only perform a PerfData operation if the PerfData object has been