< prev index next >

src/hotspot/share/runtime/objectMonitor.hpp

Print this page
rev 57560 : imported patch 8235795.patch.cr0

*** 128,151 **** // The sync code expects the header field to be at offset zero (0). // Enforced by the assert() in header_addr(). volatile markWord _header; // displaced object header word - mark void* volatile _object; // backward object pointer - strong root - 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 and _object are set at // initial inflation and _object doesn't change until deflation so // _object is a good choice 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. DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, ! sizeof(volatile markWord) + sizeof(void* volatile) + ! sizeof(ObjectMonitor *)); void* volatile _owner; // pointer to owning thread OR BasicLock volatile jlong _previous_owner_tid; // thread id of the previous owner of the monitor volatile intx _recursions; // recursion count, 0 for first entry ObjectWaiter* volatile _EntryList; // Threads blocked on entry or reentry. // The list is actually composed of WaitNodes, // acting as proxies for Threads. --- 128,155 ---- // The sync code expects the header field to be at offset zero (0). // Enforced by the assert() in header_addr(). volatile markWord _header; // displaced object header word - mark void* volatile _object; // backward object pointer - strong root private: // Separate _header and _owner on different cache lines since both can // have busy multi-threaded access. _header and _object are set at // initial inflation and _object doesn't change until deflation so // _object is a good choice to share the cache line with _header. DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, ! sizeof(volatile markWord) + sizeof(void* volatile)); void* volatile _owner; // pointer to owning thread OR BasicLock volatile jlong _previous_owner_tid; // thread id of the previous owner of the monitor + // Separate _owner and _next_om on different cache lines since + // both can have busy multi-threaded access. _previous_owner_tid is only + // changed by ObjectMonitor::exit() so it is a good choice to share the + // cache line with _owner. + DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(void* volatile) + + sizeof(volatile jlong)); + public: + ObjectMonitor* _next_om; // Next ObjectMonitor* linkage + private: volatile intx _recursions; // recursion count, 0 for first entry ObjectWaiter* volatile _EntryList; // Threads blocked on entry or reentry. // The list is actually composed of WaitNodes, // acting as proxies for Threads.
< prev index next >