ART: Add GetAllThreads

Add support for GetAllThreads. Add a test.

Bug: 31684593
Test: m test-art-host-run-test-924-threads
Change-Id: I7068dd4d3700a32a87a44d38590e53df0bd238c7
diff --git a/runtime/openjdkjvmti/ti_thread.h b/runtime/openjdkjvmti/ti_thread.h
index b6ffbb5..fca42ad 100644
--- a/runtime/openjdkjvmti/ti_thread.h
+++ b/runtime/openjdkjvmti/ti_thread.h
@@ -39,6 +39,8 @@
 
 class ThreadUtil {
  public:
+  static jvmtiError GetAllThreads(jvmtiEnv* env, jint* threads_count_ptr, jthread** threads_ptr);
+
   static jvmtiError GetCurrentThread(jvmtiEnv* env, jthread* thread_ptr);
 
   static jvmtiError GetThreadInfo(jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr);