Enable JVMTI GetOwnedMonitorInfo and GetOwnedMonitorStackDepthInfo
This enables the can_get_owned_monitor_info and
can_get_owned_monitor_stack_depth_info JVMTI capabilities and
implements all associated behaviors and functions.
Test: ./test.py --host -j50
Bug: 34415266
Bug: 62821960
Change-Id: Ia88d042259d5b15a4718f0b7698df7e7add87f1d
diff --git a/openjdkjvmti/OpenjdkJvmTi.cc b/openjdkjvmti/OpenjdkJvmTi.cc
index af77072..1cca36b 100644
--- a/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/openjdkjvmti/OpenjdkJvmTi.cc
@@ -183,22 +183,27 @@
}
static jvmtiError GetOwnedMonitorInfo(jvmtiEnv* env,
- jthread thread ATTRIBUTE_UNUSED,
- jint* owned_monitor_count_ptr ATTRIBUTE_UNUSED,
- jobject** owned_monitors_ptr ATTRIBUTE_UNUSED) {
+ jthread thread,
+ jint* owned_monitor_count_ptr,
+ jobject** owned_monitors_ptr) {
ENSURE_VALID_ENV(env);
ENSURE_HAS_CAP(env, can_get_owned_monitor_info);
- return ERR(NOT_IMPLEMENTED);
+ return StackUtil::GetOwnedMonitorInfo(env,
+ thread,
+ owned_monitor_count_ptr,
+ owned_monitors_ptr);
}
- static jvmtiError GetOwnedMonitorStackDepthInfo(
- jvmtiEnv* env,
- jthread thread ATTRIBUTE_UNUSED,
- jint* monitor_info_count_ptr ATTRIBUTE_UNUSED,
- jvmtiMonitorStackDepthInfo** monitor_info_ptr ATTRIBUTE_UNUSED) {
+ static jvmtiError GetOwnedMonitorStackDepthInfo(jvmtiEnv* env,
+ jthread thread,
+ jint* monitor_info_count_ptr,
+ jvmtiMonitorStackDepthInfo** monitor_info_ptr) {
ENSURE_VALID_ENV(env);
ENSURE_HAS_CAP(env, can_get_owned_monitor_stack_depth_info);
- return ERR(NOT_IMPLEMENTED);
+ return StackUtil::GetOwnedMonitorStackDepthInfo(env,
+ thread,
+ monitor_info_count_ptr,
+ monitor_info_ptr);
}
static jvmtiError GetCurrentContendedMonitor(jvmtiEnv* env,
diff --git a/openjdkjvmti/art_jvmti.h b/openjdkjvmti/art_jvmti.h
index 12f4cab..71a8d30 100644
--- a/openjdkjvmti/art_jvmti.h
+++ b/openjdkjvmti/art_jvmti.h
@@ -222,7 +222,7 @@
.can_generate_field_access_events = 1,
.can_get_bytecodes = 1,
.can_get_synthetic_attribute = 1,
- .can_get_owned_monitor_info = 0,
+ .can_get_owned_monitor_info = 1,
.can_get_current_contended_monitor = 0,
.can_get_monitor_info = 0,
.can_pop_frame = 0,
@@ -251,7 +251,7 @@
.can_generate_garbage_collection_events = 1,
.can_generate_object_free_events = 1,
.can_force_early_return = 0,
- .can_get_owned_monitor_stack_depth_info = 0,
+ .can_get_owned_monitor_stack_depth_info = 1,
.can_get_constant_pool = 0,
.can_set_native_method_prefix = 0,
.can_retransform_classes = 1,
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index ff2de8d..20de9aa 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -45,6 +45,7 @@
#include "base/mutex.h"
#include "dex_file.h"
#include "dex_file_annotations.h"
+#include "gc_root.h"
#include "handle_scope-inl.h"
#include "jni_env_ext.h"
#include "jni_internal.h"
@@ -56,6 +57,7 @@
#include "thread-current-inl.h"
#include "thread_list.h"
#include "thread_pool.h"
+#include "ti_thread.h"
#include "well_known_classes.h"
namespace openjdkjvmti {
@@ -824,4 +826,169 @@
return ERR(NONE);
}
+struct MonitorVisitor : public art::StackVisitor, public art::SingleRootVisitor {
+ // We need a context because VisitLocks needs it retrieve the monitor objects.
+ explicit MonitorVisitor(art::Thread* thread)
+ REQUIRES_SHARED(art::Locks::mutator_lock_)
+ : art::StackVisitor(thread,
+ art::Context::Create(),
+ art::StackVisitor::StackWalkKind::kIncludeInlinedFrames),
+ hs(art::Thread::Current()),
+ current_stack_depth(0) {}
+
+ ~MonitorVisitor() {
+ delete context_;
+ }
+
+ bool VisitFrame() OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
+ if (!GetMethod()->IsRuntimeMethod()) {
+ art::Monitor::VisitLocks(this, AppendOwnedMonitors, this);
+ ++current_stack_depth;
+ }
+ return true;
+ }
+
+ static void AppendOwnedMonitors(art::mirror::Object* owned_monitor, void* arg)
+ REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
+ MonitorVisitor* visitor = reinterpret_cast<MonitorVisitor*>(arg);
+ art::ObjPtr<art::mirror::Object> mon(owned_monitor);
+ // Filter out duplicates.
+ for (const art::Handle<art::mirror::Object>& monitor : visitor->monitors) {
+ if (monitor.Get() == mon.Ptr()) {
+ return;
+ }
+ }
+ visitor->monitors.push_back(visitor->hs.NewHandle(mon));
+ visitor->stack_depths.push_back(visitor->current_stack_depth);
+ }
+
+ void VisitRoot(art::mirror::Object* obj, const art::RootInfo& info ATTRIBUTE_UNUSED)
+ OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ for (const art::Handle<art::mirror::Object>& m : monitors) {
+ if (m.Get() == obj) {
+ return;
+ }
+ }
+ monitors.push_back(hs.NewHandle(obj));
+ stack_depths.push_back(-1);
+ }
+
+ art::VariableSizedHandleScope hs;
+ jint current_stack_depth;
+ std::vector<art::Handle<art::mirror::Object>> monitors;
+ std::vector<jint> stack_depths;
+};
+
+template<typename Fn>
+struct MonitorInfoClosure : public art::Closure {
+ public:
+ MonitorInfoClosure(art::ScopedObjectAccess& soa, Fn handle_results)
+ : soa_(soa), err_(OK), handle_results_(handle_results) {}
+
+ void Run(art::Thread* target) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
+ // Find the monitors on the stack.
+ MonitorVisitor visitor(target);
+ visitor.WalkStack(/* include_transitions */ false);
+ // Find any other monitors, including ones acquired in native code.
+ art::RootInfo root_info(art::kRootVMInternal);
+ target->GetJniEnv()->monitors.VisitRoots(&visitor, root_info);
+ err_ = handle_results_(soa_, visitor);
+ }
+
+ jvmtiError GetError() {
+ return err_;
+ }
+
+ private:
+ art::ScopedObjectAccess& soa_;
+ jvmtiError err_;
+ Fn handle_results_;
+};
+
+
+template <typename Fn>
+static jvmtiError GetOwnedMonitorInfoCommon(jthread thread, Fn handle_results) {
+ art::Thread* self = art::Thread::Current();
+ art::ScopedObjectAccess soa(self);
+ MonitorInfoClosure<Fn> closure(soa, handle_results);
+ bool called_method = false;
+ {
+ art::MutexLock mu(self, *art::Locks::thread_list_lock_);
+ art::Thread* target = ThreadUtil::GetNativeThread(thread, soa);
+ if (target == nullptr && thread == nullptr) {
+ return ERR(INVALID_THREAD);
+ }
+ if (target == nullptr) {
+ return ERR(THREAD_NOT_ALIVE);
+ }
+ if (target != self) {
+ called_method = true;
+ if (!target->RequestSynchronousCheckpoint(&closure)) {
+ return ERR(THREAD_NOT_ALIVE);
+ }
+ }
+ }
+ // Cannot call the closure on the current thread if we have thread_list_lock since we need to call
+ // into the verifier which can cause the current thread to suspend for gc. Suspending would be a
+ // bad thing to do if we hold the ThreadListLock. For other threads since we are running it on a
+ // checkpoint we are fine but if the thread is the current one we need to drop the mutex first.
+ if (!called_method) {
+ closure.Run(self);
+ }
+ return closure.GetError();
+}
+
+jvmtiError StackUtil::GetOwnedMonitorStackDepthInfo(jvmtiEnv* env,
+ jthread thread,
+ jint* info_cnt,
+ jvmtiMonitorStackDepthInfo** info_ptr) {
+ if (info_cnt == nullptr || info_ptr == nullptr) {
+ return ERR(NULL_POINTER);
+ }
+ auto handle_fun = [&] (art::ScopedObjectAccess& soa, MonitorVisitor& visitor)
+ REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ auto nbytes = sizeof(jvmtiMonitorStackDepthInfo) * visitor.monitors.size();
+ jvmtiError err = env->Allocate(nbytes, reinterpret_cast<unsigned char**>(info_ptr));
+ if (err != OK) {
+ return err;
+ }
+ *info_cnt = visitor.monitors.size();
+ for (size_t i = 0; i < visitor.monitors.size(); i++) {
+ (*info_ptr)[i] = {
+ soa.Env()->AddLocalReference<jobject>(visitor.monitors[i].Get()),
+ visitor.stack_depths[i]
+ };
+ }
+ return OK;
+ };
+ return GetOwnedMonitorInfoCommon(thread, handle_fun);
+}
+
+jvmtiError StackUtil::GetOwnedMonitorInfo(jvmtiEnv* env,
+ jthread thread,
+ jint* owned_monitor_count_ptr,
+ jobject** owned_monitors_ptr) {
+ if (owned_monitors_ptr == nullptr || owned_monitors_ptr == nullptr) {
+ return ERR(NULL_POINTER);
+ }
+ auto handle_fun = [&] (art::ScopedObjectAccess& soa, MonitorVisitor& visitor)
+ REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ auto nbytes = sizeof(jobject) * visitor.monitors.size();
+ jvmtiError err = env->Allocate(nbytes, reinterpret_cast<unsigned char**>(owned_monitors_ptr));
+ if (err != OK) {
+ return err;
+ }
+ *owned_monitor_count_ptr = visitor.monitors.size();
+ for (size_t i = 0; i < visitor.monitors.size(); i++) {
+ (*owned_monitors_ptr)[i] =
+ soa.Env()->AddLocalReference<jobject>(visitor.monitors[i].Get());
+ }
+ return OK;
+ };
+ return GetOwnedMonitorInfoCommon(thread, handle_fun);
+}
+
} // namespace openjdkjvmti
diff --git a/openjdkjvmti/ti_stack.h b/openjdkjvmti/ti_stack.h
index 2e96b82..2f506d0 100644
--- a/openjdkjvmti/ti_stack.h
+++ b/openjdkjvmti/ti_stack.h
@@ -67,6 +67,16 @@
const jthread* thread_list,
jint max_frame_count,
jvmtiStackInfo** stack_info_ptr);
+
+ static jvmtiError GetOwnedMonitorStackDepthInfo(jvmtiEnv* env,
+ jthread thread,
+ jint* info_cnt_ptr,
+ jvmtiMonitorStackDepthInfo** info_ptr);
+
+ static jvmtiError GetOwnedMonitorInfo(jvmtiEnv* env,
+ jthread thread,
+ jint* owned_monitor_count_ptr,
+ jobject** owned_monitors_ptr);
};
} // namespace openjdkjvmti
diff --git a/test/1922-owned-monitors-info/expected.txt b/test/1922-owned-monitors-info/expected.txt
new file mode 100644
index 0000000..f66d1d5
--- /dev/null
+++ b/test/1922-owned-monitors-info/expected.txt
@@ -0,0 +1,678 @@
+owner-monitors, This thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [NamedLock("Lock 1")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor")]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Current thread test: owned-monitor")]
+owner-monitors, no suspend, Other thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [NamedLock("Lock 1")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor")]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: false): owned-monitor")]
+owner-monitors, suspend, Other thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [NamedLock("Lock 1")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 1"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 1"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 2"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [NamedLock("Lock 3")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [NamedLock("Lock 3"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [NamedLock("Lock 3"), Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor")]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor"), class art.Test1922$Target]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [Target("Other thread test (suspend: true): owned-monitor")]
+owner-monitors-stack-depth, This thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }, { depth: 6, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Current thread test: owned-stack-depth")" }]
+owner-monitors-stack-depth, no suspend, other thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [{ depth: 1, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 1, monitor: "NamedLock("Lock 2")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 3, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 3, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 1, monitor: "NamedLock("Lock 2")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 1, monitor: "NamedLock("Lock 2")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 3, monitor: "NamedLock("Lock 2")" }, { depth: 3, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 2")" }, { depth: 5, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "class art.Test1922$Target" }, { depth: 5, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 1, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 3, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }, { depth: 5, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 1, monitor: "Target("Other thread test (suspend: false): owned-stack-depth")" }]
+owner-monitors-stack-depth, suspend, other thread
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockOther]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockOther, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockOther, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 1")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra]
+Owned monitors: [{ depth: 2, monitor: "NamedLock("Lock 2")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 4, monitor: "NamedLock("Lock 2")" }, { depth: 4, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }, { depth: 6, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockExtra, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "NamedLock("Lock 2")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: -1, monitor: "NamedLock("Lock 3")" }, { depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: -1, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockThisNative, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockClass]
+Owned monitors: [{ depth: 2, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockClass, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 4, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockClass, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }, { depth: 6, monitor: "class art.Test1922$Target" }]
+Running: [class art.Test1922$CallLockSync, class art.Test1922$CallLockSync, class art.Test1922$CallLockSync]
+Owned monitors: [{ depth: 2, monitor: "Target("Other thread test (suspend: true): owned-stack-depth")" }]
diff --git a/test/1922-owned-monitors-info/info.txt b/test/1922-owned-monitors-info/info.txt
new file mode 100644
index 0000000..c8c9189
--- /dev/null
+++ b/test/1922-owned-monitors-info/info.txt
@@ -0,0 +1,3 @@
+Tests basic functions in the jvmti plugin.
+
+Tests that the GetBytecodes function works as expected.
diff --git a/test/1922-owned-monitors-info/owned_monitors.cc b/test/1922-owned-monitors-info/owned_monitors.cc
new file mode 100644
index 0000000..66a8368
--- /dev/null
+++ b/test/1922-owned-monitors-info/owned_monitors.cc
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <pthread.h>
+
+#include <cstdio>
+#include <iostream>
+#include <vector>
+
+#include "android-base/logging.h"
+#include "jni.h"
+#include "jvmti.h"
+
+#include "scoped_local_ref.h"
+#include "scoped_primitive_array.h"
+
+// Test infrastructure
+#include "jvmti_helper.h"
+#include "test_env.h"
+
+namespace art {
+namespace Test1922OwnedMonitors {
+
+static bool doMonitorEnter(JNIEnv* env, jobject target) {
+ return env->MonitorEnter(target) != 0;
+}
+static bool doMonitorExit(JNIEnv* env, jobject target) {
+ return env->MonitorExit(target) != 0;
+}
+
+static bool doCallRunnable(JNIEnv* env, jobject next) {
+ ScopedLocalRef<jclass> run_class(env, env->FindClass("java/lang/Runnable"));
+ if (run_class.get() == nullptr) {
+ return true;
+ }
+ jmethodID run = env->GetMethodID(run_class.get(), "run", "()V");
+ if (env->ExceptionCheck()) {
+ return true;
+ }
+ env->CallVoidMethod(next, run);
+ return env->ExceptionCheck();
+}
+
+extern "C" JNIEXPORT void JNICALL Java_art_Test1922_00024Target_lockThisNative(
+ JNIEnv* env, jobject thiz, jobject next) {
+ if (doMonitorEnter(env, thiz)) {
+ return;
+ }
+ if (doCallRunnable(env, next)) {
+ return;
+ }
+ if (doMonitorExit(env, thiz)) {
+ return;
+ }
+}
+
+extern "C" JNIEXPORT void JNICALL Java_art_Test1922_00024Target_lockNative(
+ JNIEnv* env, jobject thiz ATTRIBUTE_UNUSED, jobject mon, jobject next) {
+ if (doMonitorEnter(env, mon)) {
+ return;
+ }
+ if (doCallRunnable(env, next)) {
+ return;
+ }
+ if (doMonitorExit(env, mon)) {
+ return;
+ }
+}
+
+extern "C" JNIEXPORT void JNICALL Java_art_Test1922_setupTest(JNIEnv* env, jclass) {
+ jvmtiCapabilities caps;
+ memset(&caps, 0, sizeof(caps));
+ caps.can_get_owned_monitor_info = 1;
+ caps.can_get_owned_monitor_stack_depth_info = 1;
+ JvmtiErrorToException(env, jvmti_env, jvmti_env->AddCapabilities(&caps));
+}
+
+extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test1922_getOwnedMonitorStackDepthInfo(
+ JNIEnv* env, jclass, jthread thread) {
+ jint len = 0;
+ jvmtiMonitorStackDepthInfo* monitors = nullptr;
+ if (JvmtiErrorToException(
+ env, jvmti_env, jvmti_env->GetOwnedMonitorStackDepthInfo(thread, &len, &monitors))) {
+ return nullptr;
+ }
+ ScopedLocalRef<jclass> ret_class(env, env->FindClass("art/Test1922$MonitorStackDepthInfo"));
+ if (ret_class.get() == nullptr) {
+ // CNFE should be pending.
+ return nullptr;
+ }
+ jmethodID constructor = env->GetMethodID(ret_class.get(), "<init>", "(ILjava/lang/Object;)V");
+ if (env->ExceptionCheck()) {
+ return nullptr;
+ }
+ return CreateObjectArray(env, len, "art/Test1922$MonitorStackDepthInfo",
+ [&](jint i) {
+ return env->NewObject(ret_class.get(),
+ constructor,
+ monitors[i].stack_depth,
+ monitors[i].monitor);
+ });
+}
+
+extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test1922_getOwnedMonitors(JNIEnv* env,
+ jclass,
+ jthread thread) {
+ jint len = 0;
+ jobject* arr = nullptr;
+ if (JvmtiErrorToException(env, jvmti_env, jvmti_env->GetOwnedMonitorInfo(thread, &len, &arr))) {
+ return nullptr;
+ }
+ ScopedLocalRef<jclass> obj_class(env, env->FindClass("java/lang/Object"));
+ if (obj_class.get() == nullptr) {
+ // CNFE should be pending.
+ return nullptr;
+ }
+ jobjectArray ret = env->NewObjectArray(len, obj_class.get(), nullptr);
+ if (ret == nullptr) {
+ return nullptr;
+ }
+ for (jint i = 0; i < len; i++) {
+ env->SetObjectArrayElement(ret, i, arr[i]);
+ if (env->ExceptionCheck()) {
+ return nullptr;
+ }
+ }
+ return ret;
+}
+
+} // namespace Test1922OwnedMonitors
+} // namespace art
diff --git a/test/1922-owned-monitors-info/run b/test/1922-owned-monitors-info/run
new file mode 100755
index 0000000..e92b873
--- /dev/null
+++ b/test/1922-owned-monitors-info/run
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Copyright 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+./default-run "$@" --jvmti
diff --git a/test/1922-owned-monitors-info/src/Main.java b/test/1922-owned-monitors-info/src/Main.java
new file mode 100644
index 0000000..2bd272f
--- /dev/null
+++ b/test/1922-owned-monitors-info/src/Main.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class Main {
+ public static void main(String[] args) throws Exception {
+ art.Test1922.run();
+ }
+}
diff --git a/test/1922-owned-monitors-info/src/art/Suspension.java b/test/1922-owned-monitors-info/src/art/Suspension.java
new file mode 100644
index 0000000..16e62cc
--- /dev/null
+++ b/test/1922-owned-monitors-info/src/art/Suspension.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package art;
+
+public class Suspension {
+ // Suspends a thread using jvmti.
+ public native static void suspend(Thread thr);
+
+ // Resumes a thread using jvmti.
+ public native static void resume(Thread thr);
+
+ public native static boolean isSuspended(Thread thr);
+
+ public native static int[] suspendList(Thread... threads);
+ public native static int[] resumeList(Thread... threads);
+}
diff --git a/test/1922-owned-monitors-info/src/art/Test1922.java b/test/1922-owned-monitors-info/src/art/Test1922.java
new file mode 100644
index 0000000..82f1a6c
--- /dev/null
+++ b/test/1922-owned-monitors-info/src/art/Test1922.java
@@ -0,0 +1,357 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package art;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+public class Test1922 {
+ // Set to true to run with all combinations of locks. This isn't really needed for the test to be
+ // useful and fully representative.
+ public final static boolean ALL_COMBOS = false;
+
+ // A runnable that lets us know when a different thread is paused.
+ public static class ThreadPauser implements Runnable {
+ private boolean suspend;
+ private volatile Thread paused_thread;
+ public ThreadPauser(boolean suspend) {
+ paused_thread = null;
+ this.suspend = suspend;
+ }
+ public ThreadPauser() {
+ paused_thread = null;
+ this.suspend = false;
+ }
+
+ @Override
+ public void run() {
+ this.paused_thread = Thread.currentThread();
+ if (suspend) {
+ Suspension.suspend(paused_thread);
+ }
+ while (this.paused_thread != null) {}
+ }
+
+ public void waitForOtherThreadToPause() {
+ while (this.paused_thread == null) {}
+ if (suspend) {
+ while (!Suspension.isSuspended(this.paused_thread)) {}
+ }
+ }
+
+ public void wakeupOtherThread() {
+ if (this.paused_thread == null) {
+ throw new Error("Other thread is not paused!");
+ }
+ if (suspend) {
+ Suspension.resume(this.paused_thread);
+ while (Suspension.isSuspended(this.paused_thread)) {}
+ }
+ this.paused_thread = null;
+ }
+ }
+
+ // A class with a number of monitor operations in its methods.
+ public static class Target {
+ public String name;
+ public Target(String name) { this.name = name; }
+ public String toString() { return "Target(\"" + name + "\")"; }
+
+ // synchronize on Target.class
+ public void lockClass(Runnable safepoint) {
+ synchronized (this.getClass()) {
+ safepoint.run();
+ }
+ }
+
+ // use java synchronized method.
+ public synchronized void lockSync(Runnable safepoint) {
+ safepoint.run();
+ }
+
+ // use java synchronized method and synchronize on another object.
+ public synchronized void lockExtra(Object l, Runnable safepoint) {
+ synchronized (l) {
+ safepoint.run();
+ }
+ }
+
+ // monitor enter the object 'l' in native code.
+ public native void lockNative(Object l, Runnable safepoint);
+
+ // monitor enter 'this' in native code.
+ public native void lockThisNative(Runnable safepoint);
+
+ // synchronize on 'l'
+ public void lockOther(Object l, Runnable safepoint) {
+ synchronized (l) {
+ safepoint.run();
+ }
+ }
+
+ // Don't do anything. Just call the next method.
+ public void callSafepoint(Runnable safepoint) {
+ safepoint.run();
+ }
+ }
+
+ // A lock with a toString.
+ public static class NamedLock {
+ public String name;
+ public NamedLock(String name) { this.name = name; }
+ public String toString() { return "NamedLock(\"" + name + "\")"; }
+ }
+
+ private static Object[] sortByString(Object[] arr) {
+ Arrays.sort(arr, (a, b) -> a.toString().compareTo(b.toString()));
+ return arr;
+ }
+
+ public static class PrintOwnedMonitorsStackDepthRunnable implements Runnable {
+ public final Thread target;
+ public PrintOwnedMonitorsStackDepthRunnable(Thread target) {
+ this.target = target;
+ }
+ public void run() {
+ System.out.println("Owned monitors: " +
+ Arrays.toString(sortByString(getOwnedMonitorStackDepthInfo(target))));
+ }
+ }
+
+ public static class PrintOwnedMonitorsRunnable implements Runnable {
+ public final Thread target;
+ public PrintOwnedMonitorsRunnable(Thread target) {
+ this.target = target;
+ }
+ public void run() {
+ System.out.println("Owned monitors: " +
+ Arrays.toString(sortByString(getOwnedMonitors(target))));
+ }
+ }
+
+ public static void run() throws Exception {
+ setupTest();
+
+ System.out.println("owner-monitors, This thread");
+ runTestsCurrentThread("owned-monitor",
+ new PrintOwnedMonitorsRunnable(Thread.currentThread()));
+
+ System.out.println("owner-monitors, no suspend, Other thread");
+ runTestsOtherThread("owned-monitor", false,
+ (t) -> { new PrintOwnedMonitorsRunnable(t).run(); });
+
+ System.out.println("owner-monitors, suspend, Other thread");
+ runTestsOtherThread("owned-monitor", true,
+ (t) -> { new PrintOwnedMonitorsRunnable(t).run(); });
+
+ System.out.println("owner-monitors-stack-depth, This thread");
+ runTestsCurrentThread("owned-stack-depth",
+ new PrintOwnedMonitorsStackDepthRunnable(Thread.currentThread()));
+
+ System.out.println("owner-monitors-stack-depth, no suspend, other thread");
+ runTestsOtherThread("owned-stack-depth", false,
+ (t) -> { new PrintOwnedMonitorsStackDepthRunnable(t).run(); });
+
+ System.out.println("owner-monitors-stack-depth, suspend, other thread");
+ runTestsOtherThread("owned-stack-depth", true,
+ (t) -> { new PrintOwnedMonitorsStackDepthRunnable(t).run(); });
+ }
+
+ public static void runTestsOtherThread(String name, boolean suspend, Consumer<Thread> printer) {
+ final Target t = new Target("Other thread test (suspend: " + suspend + "): " + name);
+ final NamedLock l1 = new NamedLock("Lock 1");
+ final NamedLock l2 = new NamedLock("Lock 2");
+ final NamedLock l3 = new NamedLock("Lock 3");
+
+ List<Function<Runnable, Runnable>> MkSafepoints = Arrays.asList(
+ (r) -> { return new CallLockOther(t, l1, r); },
+ (r) -> { return new CallLockExtra(t, l2, r); },
+ (r) -> { return new CallLockNative(t, l3, r); },
+ (r) -> { return new CallLockThisNative(t, r); },
+ (r) -> { return new CallLockClass(t, r); },
+ (r) -> { return new CallLockSync(t, r); },
+ (r) -> { return new CallSafepoint(t, r); }
+ );
+ // Use ListIterators so we can have elements in the test multiple times.
+ ListIterator<Function<Runnable, Runnable>> li1 = MkSafepoints.listIterator();
+ for (Function<Runnable, Runnable> r1 = li1.next(); li1.hasNext(); r1 = li1.next()) {
+ ListIterator<Function<Runnable, Runnable>> li2 =
+ MkSafepoints.listIterator(ALL_COMBOS ? 0 : li1.previousIndex());
+ for (Function<Runnable, Runnable> r2 = li2.next(); li2.hasNext(); r2 = li2.next()) {
+ ListIterator<Function<Runnable, Runnable>> li3 =
+ MkSafepoints.listIterator(ALL_COMBOS ? 0 : li2.previousIndex());
+ for (Function<Runnable, Runnable> r3 = li3.next(); li3.hasNext(); r3 = li3.next()) {
+ System.out.println("Running: " + Arrays.toString(
+ new Object[] {
+ r1.apply(null).getClass(),
+ r2.apply(null).getClass(),
+ r3.apply(null).getClass(),
+ }));
+ try {
+ final ThreadPauser pause = new ThreadPauser(suspend);
+ final Thread thr = new Thread(r1.apply(r2.apply(r3.apply(pause))));
+ thr.start();
+ pause.waitForOtherThreadToPause();
+ printer.accept(thr);
+ pause.wakeupOtherThread();
+ thr.join();
+ } catch (Exception e) {
+ throw new Error("Exception in test." , e);
+ }
+ }
+ }
+ }
+ }
+ public static void runTestsCurrentThread(String name, Runnable printer) {
+ final Target t = new Target("Current thread test: " + name);
+ final NamedLock l1 = new NamedLock("Lock 1");
+ final NamedLock l2 = new NamedLock("Lock 2");
+ final NamedLock l3 = new NamedLock("Lock 3");
+
+ List<Function<Runnable, Runnable>> MkSafepoints = Arrays.asList(
+ (r) -> { return new CallLockOther(t, l1, r); },
+ (r) -> { return new CallLockExtra(t, l2, r); },
+ (r) -> { return new CallLockNative(t, l3, r); },
+ (r) -> { return new CallLockThisNative(t, r); },
+ (r) -> { return new CallLockClass(t, r); },
+ (r) -> { return new CallLockSync(t, r); },
+ (r) -> { return new CallSafepoint(t, r); }
+ );
+ ListIterator<Function<Runnable, Runnable>> li1 = MkSafepoints.listIterator();
+ for (Function<Runnable, Runnable> r1 = li1.next(); li1.hasNext(); r1 = li1.next()) {
+ ListIterator<Function<Runnable, Runnable>> li2 =
+ MkSafepoints.listIterator(ALL_COMBOS ? 0 : li1.previousIndex());
+ for (Function<Runnable, Runnable> r2 = li2.next(); li2.hasNext(); r2 = li2.next()) {
+ ListIterator<Function<Runnable, Runnable>> li3 =
+ MkSafepoints.listIterator(ALL_COMBOS ? 0 : li2.previousIndex());
+ for (Function<Runnable, Runnable> r3 = li3.next(); li3.hasNext(); r3 = li3.next()) {
+ System.out.println("Running: " + Arrays.toString(
+ new Object[] {
+ r1.apply(null).getClass(),
+ r2.apply(null).getClass(),
+ r3.apply(null).getClass(),
+ }));
+ r1.apply(r2.apply(r3.apply(printer))).run();
+ }
+ }
+ }
+ }
+
+ public static native void setupTest();
+ public static native Object[] getOwnedMonitors(Thread thr);
+ public static native MonitorStackDepthInfo[] getOwnedMonitorStackDepthInfo(Thread thr);
+ public static class MonitorStackDepthInfo {
+ public final int depth;
+ public final Object monitor;
+ public MonitorStackDepthInfo(int depth, Object monitor) {
+ this.depth = depth;
+ this.monitor = monitor;
+ }
+ public String toString() {
+ return "{ depth: " + depth + ", monitor: \"" + monitor.toString() + "\" }";
+ }
+ }
+
+ // We want to avoid synthetic methods that would mess up our stack-depths so we make everything
+ // explicit here.
+ public static class CallSafepoint implements Runnable {
+ public final Target target;
+ public final Runnable safepoint;
+ public CallSafepoint(Target target, Runnable safepoint) {
+ this.target = target;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.callSafepoint(safepoint);
+ }
+ }
+ public static class CallLockOther implements Runnable {
+ public final Target target;
+ public final Object l;
+ public final Runnable safepoint;
+ public CallLockOther(Target target, Object l, Runnable safepoint) {
+ this.target = target;
+ this.l = l;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockOther(l, safepoint);
+ }
+ }
+ public static class CallLockExtra implements Runnable {
+ public final Target target;
+ public final Object l;
+ public final Runnable safepoint;
+ public CallLockExtra(Target target, Object l, Runnable safepoint) {
+ this.target = target;
+ this.l = l;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockExtra(l, safepoint);
+ }
+ }
+ public static class CallLockThisNative implements Runnable {
+ public final Target target;
+ public final Runnable safepoint;
+ public CallLockThisNative(Target target, Runnable safepoint) {
+ this.target = target;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockThisNative(safepoint);
+ }
+ }
+ public static class CallLockNative implements Runnable {
+ public final Target target;
+ public final Object l;
+ public final Runnable safepoint;
+ public CallLockNative(Target target, Object l, Runnable safepoint) {
+ this.target = target;
+ this.l = l;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockNative(l, safepoint);
+ }
+ }
+ public static class CallLockClass implements Runnable {
+ public final Target target;
+ public final Runnable safepoint;
+ public CallLockClass(Target target, Runnable safepoint) {
+ this.target = target;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockClass(safepoint);
+ }
+ }
+ public static class CallLockSync implements Runnable {
+ public final Target target;
+ public final Runnable safepoint;
+ public CallLockSync(Target target, Runnable safepoint) {
+ this.target = target;
+ this.safepoint = safepoint;
+ }
+ public void run() {
+ target.lockSync(safepoint);
+ }
+ }
+}
diff --git a/test/Android.bp b/test/Android.bp
index 4d82cbb..d0c0565 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -294,6 +294,7 @@
"1919-vminit-thread-start-timing/vminit.cc",
"1920-suspend-native-monitor/native_suspend_monitor.cc",
"1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
+ "1922-owned-monitors-info/owned_monitors.cc",
],
shared_libs: [
"libbase",