Do not instrument proxy methods.
This fixes issues with traceview on Books.
Bug: 11512992
Change-Id: Id67578af5e404fca51aa99860a3a61a68574ccf8
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 6caad01..f3a42eb 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -56,10 +56,10 @@
bool is_initialized = klass->IsInitialized();
for (size_t i = 0; i < klass->NumDirectMethods(); i++) {
mirror::ArtMethod* method = klass->GetDirectMethod(i);
- if (!method->IsAbstract()) {
+ if (!method->IsAbstract() && !method->IsProxyMethod()) {
const void* new_code;
if (uninstall) {
- if (forced_interpret_only_ && !method->IsNative() && !method->IsProxyMethod()) {
+ if (forced_interpret_only_ && !method->IsNative()) {
new_code = GetCompiledCodeToInterpreterBridge();
} else if (is_initialized || !method->IsStatic() || method->IsConstructor()) {
new_code = class_linker->GetOatCodeFor(method);
@@ -78,10 +78,10 @@
}
for (size_t i = 0; i < klass->NumVirtualMethods(); i++) {
mirror::ArtMethod* method = klass->GetVirtualMethod(i);
- if (!method->IsAbstract()) {
+ if (!method->IsAbstract() && !method->IsProxyMethod()) {
const void* new_code;
if (uninstall) {
- if (forced_interpret_only_ && !method->IsNative() && !method->IsProxyMethod()) {
+ if (forced_interpret_only_ && !method->IsNative()) {
new_code = GetCompiledCodeToInterpreterBridge();
} else {
new_code = class_linker->GetOatCodeFor(method);