--- old/src/hotspot/share/runtime/biasedLocking.cpp 2020-01-16 03:30:56.469266533 +0000 +++ new/src/hotspot/share/runtime/biasedLocking.cpp 2020-01-16 03:30:54.888228731 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -622,7 +622,7 @@ p2i(biaser), p2i(obj())); RevokeOneBias revoke(obj, requester, biaser); - bool executed = Handshake::execute(&revoke, biaser); + bool executed = Handshake::execute_direct(&revoke, biaser); if (revoke.status_code() == NOT_REVOKED) { return NOT_REVOKED; } @@ -668,7 +668,8 @@ void BiasedLocking::walk_stack_and_revoke(oop obj, JavaThread* biased_locker) { assert(!SafepointSynchronize::is_at_safepoint() || !SafepointMechanism::uses_thread_local_poll(), "if SafepointMechanism::uses_thread_local_poll() is enabled this should always be executed outside safepoints"); - assert(Thread::current() == biased_locker || Thread::current()->is_VM_thread(), "wrong thread"); + assert(Thread::current() == biased_locker || Thread::current() == biased_locker->get_active_handshaker() || + Thread::current()->is_VM_thread(), "wrong thread"); markWord mark = obj->mark(); assert(mark.biased_locker() == biased_locker &&