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.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/runtime_callbacks.cc b/runtime/runtime_callbacks.cc
index 339fe822fd..40d7889565 100644
--- a/runtime/runtime_callbacks.cc
+++ b/runtime/runtime_callbacks.cc
@@ -35,6 +35,20 @@ static inline void Remove(T* cb, std::vector<T*>* data) {
}
}
+void RuntimeCallbacks::AddDdmCallback(DdmCallback* cb) {
+ ddm_callbacks_.push_back(cb);
+}
+
+void RuntimeCallbacks::RemoveDdmCallback(DdmCallback* cb) {
+ Remove(cb, &ddm_callbacks_);
+}
+
+void RuntimeCallbacks::DdmPublishChunk(uint32_t type, const ArrayRef<const uint8_t>& data) {
+ for (DdmCallback* cb : ddm_callbacks_) {
+ cb->DdmPublishChunk(type, data);
+ }
+}
+
void RuntimeCallbacks::AddMethodInspectionCallback(MethodInspectionCallback* cb) {
method_inspection_callbacks_.push_back(cb);
}