From: Jeff Hao Date: Tue, 19 Aug 2014 17:17:36 +0000 (-0700) Subject: Check for constructor first when installing tracing stubs. X-Git-Tag: android-x86-6.0-r1~145^2~2216^2~2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5680277985570f25d5d3cbb44f51d10365b73025;p=android-x86%2Fart.git Check for constructor first when installing tracing stubs. Addresses comments in https://android-review.googlesource.com/#/c/104383/ made after the commit. Bug: 16386215 (cherry picked from commit 5afe466c027c6ac821bf7c9a88cd7de5260a639b) Change-Id: Ic81161d0b96a0633c4c534a93172cff59312fa61 --- diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc index d5c6e4f50..47d35f350 100644 --- a/runtime/instrumentation.cc +++ b/runtime/instrumentation.cc @@ -121,11 +121,9 @@ void Instrumentation::InstallStubsForMethod(mirror::ArtMethod* method) { // Do not change stubs for these methods. return; } - std::string temp; - // Note that the Proxy class itself is not a proxy class. - if (strcmp(method->GetDeclaringClass()->GetDescriptor(&temp), "Ljava/lang/reflect/Proxy;") == 0 && - method->IsConstructor()) { - // Do not stub Proxy.. + // Don't stub Proxy.. Note that the Proxy class itself is not a proxy class. + if (method->IsConstructor() && + method->GetDeclaringClass()->DescriptorEquals("Ljava/lang/reflect/Proxy;")) { return; } const void* new_portable_code;