< prev index next >
src/hotspot/share/runtime/biasedLocking.cpp
Print this page
@@ -666,28 +666,28 @@
// 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");
- assert(Thread::current() == biased_locker || Thread::current() == biased_locker->get_active_handshaker() ||
- Thread::current()->is_VM_thread(), "wrong thread");
+ Thread* cur = Thread::current();
+ assert(cur == biased_locker || cur == biased_locker->get_active_handshaker() || cur->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",
- Thread::current()->is_VM_thread() ? "VMThread" : "JavaThread",
- p2i(Thread::current()),
+ cur->is_VM_thread() ? "VMThread" : "JavaThread",
+ p2i(cur),
p2i(obj),
mark.value(),
obj->klass()->external_name(),
obj->klass()->prototype_header().value(),
p2i(biased_locker),
- Thread::current()->is_VM_thread() ? "" : "(walking own stack)");
+ cur->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 >