< prev index next > src/hotspot/share/prims/jvmtiEnvBase.cpp
Print this page
#include "runtime/jniHandles.inline.hpp"
#include "runtime/objectMonitor.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/signature.hpp"
#include "runtime/stackWatermarkSet.inline.hpp"
+ #include "runtime/synchronizer.inline.hpp"
#include "runtime/threads.hpp"
#include "runtime/threadSMR.inline.hpp"
#include "runtime/vframe.inline.hpp"
#include "runtime/vframe_hp.hpp"
#include "runtime/vmThread.hpp"
hobj = Handle(current_thread, mirror);
}
ThreadsListHandle tlh(current_thread);
JavaThread *owning_thread = nullptr;
- ObjectMonitor *mon = nullptr;
jvmtiMonitorUsage ret = {
nullptr, 0, 0, nullptr, 0, nullptr
};
uint32_t debug_bits = 0;
jint nWant = 0, nWait = 0;
markWord mark = hobj->mark();
ResourceMark rm(current_thread);
GrowableArray<JavaThread*>* wantList = nullptr;
! if (mark.has_monitor()) {
! mon = mark.monitor();
assert(mon != nullptr, "must have monitor");
// this object has a heavyweight monitor
nWant = mon->contentions(); // # of threads contending for monitor entry, but not re-entry
nWait = mon->waiters(); // # of threads waiting for notification,
// or to re-enter monitor, in Object.wait()
jint nWant = 0, nWait = 0;
markWord mark = hobj->mark();
ResourceMark rm(current_thread);
GrowableArray<JavaThread*>* wantList = nullptr;
! ObjectMonitor* mon = mark.has_monitor()
! ? ObjectSynchronizer::read_monitor(current_thread, hobj(), mark)
+ : nullptr;
+
+ if (mon != nullptr) {
assert(mon != nullptr, "must have monitor");
// this object has a heavyweight monitor
nWant = mon->contentions(); // # of threads contending for monitor entry, but not re-entry
nWait = mon->waiters(); // # of threads waiting for notification,
// or to re-enter monitor, in Object.wait()
< prev index next >