summaryrefslogtreecommitdiff
path: root/runtime/runtime_callbacks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime_callbacks.cc')
-rw-r--r--runtime/runtime_callbacks.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/runtime/runtime_callbacks.cc b/runtime/runtime_callbacks.cc
index 16d6c13722..88d3f28583 100644
--- a/runtime/runtime_callbacks.cc
+++ b/runtime/runtime_callbacks.cc
@@ -21,6 +21,7 @@
#include "art_method.h"
#include "base/macros.h"
#include "class_linker.h"
+#include "monitor.h"
#include "thread.h"
namespace art {
@@ -38,6 +39,38 @@ static inline void Remove(T* cb, std::vector<T*>* data) {
}
}
+void RuntimeCallbacks::MonitorContendedLocking(Monitor* m) {
+ for (MonitorCallback* cb : monitor_callbacks_) {
+ cb->MonitorContendedLocking(m);
+ }
+}
+
+void RuntimeCallbacks::MonitorContendedLocked(Monitor* m) {
+ for (MonitorCallback* cb : monitor_callbacks_) {
+ cb->MonitorContendedLocked(m);
+ }
+}
+
+void RuntimeCallbacks::ObjectWaitStart(Handle<mirror::Object> m, int64_t timeout) {
+ for (MonitorCallback* cb : monitor_callbacks_) {
+ cb->ObjectWaitStart(m, timeout);
+ }
+}
+
+void RuntimeCallbacks::MonitorWaitFinished(Monitor* m, bool timeout) {
+ for (MonitorCallback* cb : monitor_callbacks_) {
+ cb->MonitorWaitFinished(m, timeout);
+ }
+}
+
+void RuntimeCallbacks::AddMonitorCallback(MonitorCallback* cb) {
+ monitor_callbacks_.push_back(cb);
+}
+
+void RuntimeCallbacks::RemoveMonitorCallback(MonitorCallback* cb) {
+ Remove(cb, &monitor_callbacks_);
+}
+
void RuntimeCallbacks::RemoveThreadLifecycleCallback(ThreadLifecycleCallback* cb) {
Remove(cb, &thread_callbacks_);
}