ART: Add event callback support

Add basic event callback support infrastructure. Actual users will
follow.

Bug: 31684920
Test: m test-art-host
Change-Id: Ic496933ef3a94f9d27a2779b7f4fdc5b096eab22
diff --git a/runtime/openjdkjvmti/art_jvmti.h b/runtime/openjdkjvmti/art_jvmti.h
index a2c6882..66d0937 100644
--- a/runtime/openjdkjvmti/art_jvmti.h
+++ b/runtime/openjdkjvmti/art_jvmti.h
@@ -32,8 +32,12 @@
 #ifndef ART_RUNTIME_OPENJDKJVMTI_ART_JVMTI_H_
 #define ART_RUNTIME_OPENJDKJVMTI_ART_JVMTI_H_
 
+#include <memory>
+
 #include <jni.h>
 
+#include "base/casts.h"
+#include "events.h"
 #include "java_vm_ext.h"
 #include "jni_env_ext.h"
 #include "jvmti.h"
@@ -47,9 +51,16 @@
   art::JavaVMExt* art_vm;
   void* local_data;
 
+  EventMasks event_masks;
+  std::unique_ptr<jvmtiEventCallbacks> event_callbacks;
+
   explicit ArtJvmTiEnv(art::JavaVMExt* runtime) : art_vm(runtime), local_data(nullptr) {
     functions = &gJvmtiInterface;
   }
+
+  static ArtJvmTiEnv* AsArtJvmTiEnv(jvmtiEnv* env) {
+    return art::down_cast<ArtJvmTiEnv*>(env);
+  }
 };
 
 // Macro and constexpr to make error values less annoying to write.