Add support for JVMTI monitor events.
Adds support for the JVMTI can_generate_monitor_events capability and
all associated events. This adds support for the
JVMTI_EVENT_MONITOR_WAIT, JVMTI_EVENT_MONITOR_WAITED,
JVMTI_EVENT_MONITOR_CONTENDED_ENTER, and
JVMTI_EVENT_MONITOR_CONTENDED_ENTERED events.
Bug: 65558434
Bug: 62821960
Bug: 34415266
Test: ./test.py --host -j50
Change-Id: I0fe8038e6c4249e77d37a67e5056b5d2a94b6f48
diff --git a/runtime/gc/task_processor.cc b/runtime/gc/task_processor.cc
index 0704a68..e928644 100644
--- a/runtime/gc/task_processor.cc
+++ b/runtime/gc/task_processor.cc
@@ -34,14 +34,14 @@
}
void TaskProcessor::AddTask(Thread* self, HeapTask* task) {
- ScopedThreadStateChange tsc(self, kBlocked);
+ ScopedThreadStateChange tsc(self, kWaitingForTaskProcessor);
MutexLock mu(self, *lock_);
tasks_.insert(task);
cond_->Signal(self);
}
HeapTask* TaskProcessor::GetTask(Thread* self) {
- ScopedThreadStateChange tsc(self, kBlocked);
+ ScopedThreadStateChange tsc(self, kWaitingForTaskProcessor);
MutexLock mu(self, *lock_);
while (true) {
if (tasks_.empty()) {