OSDN Git Service

ART: Add trivial implementation of extensions
authorAndreas Gampe <agampe@google.com>
Mon, 9 Jan 2017 18:50:17 +0000 (10:50 -0800)
committerAndreas Gampe <agampe@google.com>
Mon, 9 Jan 2017 18:50:17 +0000 (10:50 -0800)
We do not need extension support.

Bug: 31455788
Test: m test-art-host
Change-Id: I40e9435ad3ffee83070c522a1938509db4cc889e

runtime/openjdkjvmti/OpenjdkJvmTi.cc

index 81e21d1..fa55e85 100644 (file)
@@ -840,19 +840,28 @@ class JvmtiFunctions {
   static jvmtiError GetExtensionFunctions(jvmtiEnv* env,
                                           jint* extension_count_ptr,
                                           jvmtiExtensionFunctionInfo** extensions) {
-    return ERR(NOT_IMPLEMENTED);
+    // We do not have any extension functions.
+    *extension_count_ptr = 0;
+    *extensions = nullptr;
+
+    return ERR(NONE);
   }
 
   static jvmtiError GetExtensionEvents(jvmtiEnv* env,
                                        jint* extension_count_ptr,
                                        jvmtiExtensionEventInfo** extensions) {
-    return ERR(NOT_IMPLEMENTED);
+    // We do not have any extension events.
+    *extension_count_ptr = 0;
+    *extensions = nullptr;
+
+    return ERR(NONE);
   }
 
   static jvmtiError SetExtensionEventCallback(jvmtiEnv* env,
                                               jint extension_event_index,
                                               jvmtiExtensionEvent callback) {
-    return ERR(NOT_IMPLEMENTED);
+    // We do not have any extension events, so any call is illegal.
+    return ERR(ILLEGAL_ARGUMENT);
   }
 
   static jvmtiError GetPotentialCapabilities(jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr) {