--- old/src/hotspot/share/runtime/objectMonitor.hpp 2019-10-17 17:31:40.000000000 -0400 +++ new/src/hotspot/share/runtime/objectMonitor.hpp 2019-10-17 17:31:40.000000000 -0400 @@ -191,7 +191,6 @@ 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 @@ -226,6 +225,7 @@ static int header_offset_in_bytes() { return offset_of(ObjectMonitor, _header); } static int object_offset_in_bytes() { return offset_of(ObjectMonitor, _object); } static int owner_offset_in_bytes() { return offset_of(ObjectMonitor, _owner); } + static int ref_count_offset_in_bytes() { return offset_of(ObjectMonitor, _ref_count); } static int recursions_offset_in_bytes() { return offset_of(ObjectMonitor, _recursions); } static int cxq_offset_in_bytes() { return offset_of(ObjectMonitor, _cxq); } static int succ_offset_in_bytes() { return offset_of(ObjectMonitor, _succ); } @@ -272,7 +272,15 @@ void* owner() const; // Returns NULL if DEFLATER_MARKER is observed. // Returns true if owner field == DEFLATER_MARKER and false otherwise. bool owner_is_DEFLATER_MARKER(); - void set_owner(void* owner); + // Set _owner field to new_value; current value must match old_value. + void set_owner_from(void* new_value, void* old_value); + // Set _owner field to new_value; current value must match old_value1 or old_value2. + void set_owner_from(void* new_value, void* old_value1, void* old_value2); + // Set _owner field to self; current value must match basic_lock_p. + void set_owner_from_BasicLock(Thread* self, void* basic_lock_p); + // Try to set _owner field to new_value if the current value matches + // old_value. Otherwise, does not change the _owner field. + void* try_set_owner_from(void* new_value, void* old_value); jint waiters() const; @@ -339,6 +347,7 @@ void notifyAll(TRAPS); void print() const; + void print_debug_style_on(outputStream* st) const; void print_on(outputStream* st) const; // Use the following at your own risk