NativePcOffsetToReferenceMap
Rather than translate a native PC to a Dex PC and then to the reference
bitmap, just go straight from the native PC to the reference bitmap.
Encode the native PC offsets using a hash rather than linearly
searching.
Change-Id: Iee1073d93c941c0a31f639e5f23cea9e9f747bee
diff --git a/test/StackWalk/stack_walk_jni.cc b/test/StackWalk/stack_walk_jni.cc
index 5fdb92f..3c37a98 100644
--- a/test/StackWalk/stack_walk_jni.cc
+++ b/test/StackWalk/stack_walk_jni.cc
@@ -18,11 +18,11 @@
#include "UniquePtr.h"
#include "class_linker.h"
+#include "gc_map.h"
#include "object.h"
#include "object_utils.h"
#include "jni.h"
#include "scoped_thread_state_change.h"
-#include "verifier/gc_map.h"
namespace art {
@@ -58,8 +58,8 @@
}
const uint8_t* reg_bitmap = NULL;
if (!IsShadowFrame()) {
- verifier::DexPcToReferenceMap map(m->GetGcMap(), m->GetGcMapLength());
- reg_bitmap = map.FindBitMap(GetDexPc());
+ NativePcOffsetToReferenceMap map(m->GetNativeGcMap());
+ reg_bitmap = map.FindBitMap(GetNativePcOffset());
}
MethodHelper mh(m);
StringPiece m_name(mh.GetName());