Add Jvmti Suspend/ResumeThread functions
Enable the can_suspend jvmti capability and implement all required
functionality associated with it.
Test: ./test.py --host -j40
Bug: 34415266
Bug: 62821960
Bug: 63579748
Change-Id: I83b92de7f81622e1658114b034918e8295805b6e
diff --git a/runtime/openjdkjvm/OpenjdkJvm.cc b/runtime/openjdkjvm/OpenjdkJvm.cc
index 4560dda..6a8f2ce 100644
--- a/runtime/openjdkjvm/OpenjdkJvm.cc
+++ b/runtime/openjdkjvm/OpenjdkJvm.cc
@@ -432,7 +432,8 @@
art::ScopedObjectAccess soa(env);
thread->SetThreadName(name.c_str());
}
- thread_list->Resume(thread, art::SuspendReason::kInternal);
+ bool resumed = thread_list->Resume(thread, art::SuspendReason::kInternal);
+ DCHECK(resumed);
} else if (timed_out) {
LOG(ERROR) << "Trying to set thread name to '" << name.c_str() << "' failed as the thread "
"failed to suspend within a generous timeout.";