--- old/src/hotspot/share/runtime/objectMonitor.hpp 2019-12-17 15:46:03.000000000 -0500 +++ new/src/hotspot/share/runtime/objectMonitor.hpp 2019-12-17 15:46:03.000000000 -0500 @@ -120,6 +120,12 @@ // intptr_t. There's no reason to use a 64-bit type for this field // in a 64-bit JVM. +#ifndef OM_CACHE_LINE_SIZE +// Use DEFAULT_CACHE_LINE_SIZE if not already specified for +// the current build platform. +#define OM_CACHE_LINE_SIZE DEFAULT_CACHE_LINE_SIZE +#endif + class ObjectMonitor { friend class ObjectSynchronizer; friend class ObjectWaiter; @@ -139,7 +145,7 @@ // _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, + DEFINE_PAD_MINUS_SIZE(0, OM_CACHE_LINE_SIZE, sizeof(volatile markWord) + sizeof(void* volatile) + sizeof(ObjectMonitor *)); void* volatile _owner; // pointer to owning thread OR BasicLock