< prev index next > src/hotspot/share/runtime/objectMonitor.inline.hpp
Print this page
#include "runtime/objectMonitor.hpp"
#include "logging/log.hpp"
#include "oops/access.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/synchronizer.hpp"
inline intptr_t ObjectMonitor::is_entered(JavaThread* current) const {
! void* owner = owner_raw();
! if (current == owner || current->is_lock_owned((address)owner)) {
! return 1;
}
return 0;
}
inline markWord ObjectMonitor::header() const {
#include "runtime/objectMonitor.hpp"
#include "logging/log.hpp"
#include "oops/access.inline.hpp"
#include "runtime/atomic.hpp"
+ #include "runtime/lockStack.inline.hpp"
#include "runtime/synchronizer.hpp"
inline intptr_t ObjectMonitor::is_entered(JavaThread* current) const {
! if (UseFastLocking) {
! if (is_owner_anonymous()) {
! return current->lock_stack().contains(object()) ? 1 : 0;
+ } else {
+ return current == owner_raw() ? 1 : 0;
+ }
+ } else {
+ void* owner = owner_raw();
+ if (current == owner || current->is_lock_owned((address)owner)) {
+ return 1;
+ }
}
return 0;
}
inline markWord ObjectMonitor::header() const {
< prev index next >