--- old/src/hotspot/share/jfr/utilities/jfrTryLock.hpp 2019-11-21 11:55:25.349209065 +0100 +++ new/src/hotspot/share/jfr/utilities/jfrTryLock.hpp 2019-11-21 11:55:25.089204669 +0100 @@ -36,7 +36,7 @@ bool _has_lock; public: - JfrTryLock(volatile int* lock) : _lock(lock), _has_lock(Atomic::cmpxchg(1, lock, 0) == 0) {} + JfrTryLock(volatile int* lock) : _lock(lock), _has_lock(Atomic::cmpxchg(lock, 0, 1) == 0) {} ~JfrTryLock() { if (_has_lock) {