summaryrefslogtreecommitdiff
path: root/runtime/openjdkjvmti/OpenjdkJvmTi.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-10-11 19:55:37 -0700
committer Andreas Gampe <agampe@google.com> 2016-10-12 11:22:38 -0700
commite54d992ee75c0924c9a8d4e2f77dacf44c8c651b (patch)
treeb3bbf220dcd67c5496110a7096d9349b184411f6 /runtime/openjdkjvmti/OpenjdkJvmTi.cc
parentf0ab2ec6008bbd495e59bb9bf81ac399d864f38b (diff)
ART: Add heap iteration callback
Add callback support for heap iteration. Visiting of fields will be done in a follow-up. Add a test. Bug: 31385354 Test: m test-art-host-run-test-906-iterate-heap Test: m ART_TEST_GC_STRESS=true ART_TEST_GC_VERIFY=true test-art-host-run-test-906-iterate-heap Change-Id: I7bcf6751e6df4ef58756ba97701050b2ff5eb07b
Diffstat (limited to 'runtime/openjdkjvmti/OpenjdkJvmTi.cc')
-rw-r--r--runtime/openjdkjvmti/OpenjdkJvmTi.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/openjdkjvmti/OpenjdkJvmTi.cc b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
index 36be2a0127..05da585b3a 100644
--- a/runtime/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
@@ -39,6 +39,7 @@
#include "art_jvmti.h"
#include "base/mutex.h"
#include "events-inl.h"
+#include "heap.h"
#include "jni_env_ext-inl.h"
#include "object_tagging.h"
#include "obj_ptr-inl.h"
@@ -276,7 +277,8 @@ class JvmtiFunctions {
jclass klass,
const jvmtiHeapCallbacks* callbacks,
const void* user_data) {
- return ERR(NOT_IMPLEMENTED);
+ HeapUtil heap_util(&gObjectTagTable);
+ return heap_util.IterateThroughHeap(env, heap_filter, klass, callbacks, user_data);
}
static jvmtiError GetTag(jvmtiEnv* env, jobject object, jlong* tag_ptr) {