ART: Add three Timer functions
Add support for GetAvailableProcessors, GetTimerInfo and GetTime.
Add tests.
Bug: 31455788
Test: m test-art-host-run-test-926-timers
Change-Id: I9629654349787e27dee686284567b5de70e138f2
diff --git a/runtime/openjdkjvmti/OpenjdkJvmTi.cc b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
index 3825c41..4aedec9 100644
--- a/runtime/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
@@ -58,6 +58,7 @@
#include "ti_redefine.h"
#include "ti_stack.h"
#include "ti_thread.h"
+#include "ti_timers.h"
#include "transform.h"
// TODO Remove this at some point by annotating all the methods. It was put in to make the skeleton
@@ -1033,15 +1034,15 @@
}
static jvmtiError GetTimerInfo(jvmtiEnv* env, jvmtiTimerInfo* info_ptr) {
- return ERR(NOT_IMPLEMENTED);
+ return TimerUtil::GetTimerInfo(env, info_ptr);
}
static jvmtiError GetTime(jvmtiEnv* env, jlong* nanos_ptr) {
- return ERR(NOT_IMPLEMENTED);
+ return TimerUtil::GetTime(env, nanos_ptr);
}
static jvmtiError GetAvailableProcessors(jvmtiEnv* env, jint* processor_count_ptr) {
- return ERR(NOT_IMPLEMENTED);
+ return TimerUtil::GetAvailableProcessors(env, processor_count_ptr);
}
static jvmtiError AddToBootstrapClassLoaderSearch(jvmtiEnv* env, const char* segment) {