ART: Add GetStackTrace support
Add support for getting a stack trace.
Bug: 31684812
Test: m test-art-host
Change-Id: Ifa5818ebca38caafb09616ffd7df30186eb8a06f
diff --git a/runtime/openjdkjvmti/OpenjdkJvmTi.cc b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
index ed99009..10e877a 100644
--- a/runtime/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
@@ -48,6 +48,7 @@
#include "thread_list.h"
#include "thread-inl.h"
#include "ti_method.h"
+#include "ti_stack.h"
#include "transform.h"
// TODO Remove this at some point by annotating all the methods. It was put in to make the skeleton
@@ -202,7 +203,12 @@
jint max_frame_count,
jvmtiFrameInfo* frame_buffer,
jint* count_ptr) {
- return ERR(NOT_IMPLEMENTED);
+ return StackUtil::GetStackTrace(env,
+ thread,
+ start_depth,
+ max_frame_count,
+ frame_buffer,
+ count_ptr);
}
static jvmtiError GetAllStackTraces(jvmtiEnv* env,