< prev index next >
src/hotspot/share/runtime/biasedLocking.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -620,11 +620,11 @@
log_info(biasedlocking, handshake)("JavaThread " INTPTR_FORMAT " handshaking JavaThread "
INTPTR_FORMAT " to revoke object " INTPTR_FORMAT, p2i(requester),
p2i(biaser), p2i(obj()));
RevokeOneBias revoke(obj, requester, biaser);
- bool executed = Handshake::execute_direct(&revoke, biaser);
+ bool executed = Handshake::execute(&revoke, biaser);
if (revoke.status_code() == NOT_REVOKED) {
return NOT_REVOKED;
}
if (executed) {
log_info(biasedlocking, handshake)("Handshake revocation for object " INTPTR_FORMAT " succeeded. Bias was %srevoked",
@@ -666,28 +666,27 @@
// Caller should have instantiated a ResourceMark object before calling this method
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");
- Thread* cur = Thread::current();
- assert(cur == biased_locker || cur == biased_locker->get_active_handshaker() || cur->is_VM_thread(), "wrong thread");
+ assert(Thread::current() == biased_locker || Thread::current()->is_VM_thread(), "wrong thread");
markWord mark = obj->mark();
assert(mark.biased_locker() == biased_locker &&
obj->klass()->prototype_header().bias_epoch() == mark.bias_epoch(), "invariant");
log_trace(biasedlocking)("%s(" INTPTR_FORMAT ") revoking object " INTPTR_FORMAT ", mark "
INTPTR_FORMAT ", type %s, prototype header " INTPTR_FORMAT
", biaser " INTPTR_FORMAT " %s",
- cur->is_VM_thread() ? "VMThread" : "JavaThread",
- p2i(cur),
+ Thread::current()->is_VM_thread() ? "VMThread" : "JavaThread",
+ p2i(Thread::current()),
p2i(obj),
mark.value(),
obj->klass()->external_name(),
obj->klass()->prototype_header().value(),
p2i(biased_locker),
- cur->is_VM_thread() ? "" : "(walking own stack)");
+ Thread::current()->is_VM_thread() ? "" : "(walking own stack)");
markWord unbiased_prototype = markWord::prototype().set_age(obj->mark().age());
GrowableArray<MonitorInfo*>* cached_monitor_info = get_or_compute_monitor_info(biased_locker);
BasicLock* highest_lock = NULL;
< prev index next >