Add support for JVMTI GetObjectMonitorUsage function.

Adds support for the can_get_monitor_info capability and all
associated functionality. Also fixes a minor bug where monitor info
incorrectly said that an unlocked monitor had 1 entry in some cases.

Test: ./test.py --host -j50
Test: art/tools/run-jdwp-tests --mode=host

Bug: 62821960
Bug: 34409230

Change-Id: I9a4817ea309aaf94c56e9c0a694b88c93e7b629c
diff --git a/openjdkjvmti/OpenjdkJvmTi.cc b/openjdkjvmti/OpenjdkJvmTi.cc
index 6c0d492..277f611 100644
--- a/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/openjdkjvmti/OpenjdkJvmTi.cc
@@ -810,11 +810,11 @@
   }
 
   static jvmtiError GetObjectMonitorUsage(jvmtiEnv* env,
-                                          jobject object ATTRIBUTE_UNUSED,
-                                          jvmtiMonitorUsage* info_ptr ATTRIBUTE_UNUSED) {
+                                          jobject object,
+                                          jvmtiMonitorUsage* info_ptr) {
     ENSURE_VALID_ENV(env);
     ENSURE_HAS_CAP(env, can_get_monitor_info);
-    return ERR(NOT_IMPLEMENTED);
+    return ObjectUtil::GetObjectMonitorUsage(env, object, info_ptr);
   }
 
   static jvmtiError GetFieldName(jvmtiEnv* env,