Revert "Fix proxy tracing and enable tests that now work with tracing."

This reverts commit 0398e171f206cd3b140a358ac31b0a3760380df1.

Change-Id: I1346ab01485cc7207be0ecb4d8788c500c0df903
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 3e8dc23..5599c21 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3501,19 +3501,14 @@
       proxy_class->GetDirectMethods();
   CHECK_EQ(proxy_direct_methods->GetLength(), 16);
   mirror::ArtMethod* proxy_constructor = proxy_direct_methods->Get(2);
-  mirror::ArtMethod* constructor = down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self));
-  if (constructor == nullptr) {
+  // Clone the existing constructor of Proxy (our constructor would just invoke it so steal its
+  // code_ too)
+  mirror::ArtMethod* constructor =
+      down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self));
+  if (constructor == NULL) {
     CHECK(self->IsExceptionPending());  // OOME.
-    return nullptr;
+    return NULL;
   }
-  // Make the proxy constructor's code always point to the uninstrumented code. This avoids
-  // getting a method enter event for the proxy constructor as the proxy constructor doesn't
-  // have an activation.
-  bool have_portable_code;
-  constructor->SetEntryPointFromQuickCompiledCode(GetQuickOatCodeFor(proxy_constructor));
-  constructor->SetEntryPointFromPortableCompiledCode(GetPortableOatCodeFor(proxy_constructor,
-                                                                           &have_portable_code));
-
   // Make this constructor public and fix the class to be our Proxy version
   constructor->SetAccessFlags((constructor->GetAccessFlags() & ~kAccProtected) | kAccPublic);
   constructor->SetDeclaringClass(klass.Get());
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 8bc3707..338bd06 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -586,7 +586,8 @@
   const char* old_cause =
       self->StartAssertNoThreadSuspension("Adding to IRT proxy object arguments");
   // Register the top of the managed stack, making stack crawlable.
-  DCHECK_EQ(sp->AsMirrorPtr(), proxy_method) << PrettyMethod(proxy_method);
+  DCHECK_EQ(sp->AsMirrorPtr(), proxy_method)
+  << PrettyMethod(proxy_method);
   self->SetTopOfStack(sp, 0);
   DCHECK_EQ(proxy_method->GetFrameSizeInBytes(),
             Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes())
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc
index c27b203..211ba1d 100644
--- a/runtime/mirror/art_method.cc
+++ b/runtime/mirror/art_method.cc
@@ -158,12 +158,12 @@
       }
     }
   }
-  if (kIsDebugBuild) {
-    StackHandleScope<2> hs(Thread::Current());
-    MethodHelper result_mh(hs.NewHandle(result));
-    MethodHelper this_mh(hs.NewHandle(this));
-    DCHECK(result == nullptr || this_mh.HasSameNameAndSignature(&result_mh));
-  }
+#ifndef NDEBUG
+  StackHandleScope<2> hs(Thread::Current());
+  MethodHelper result_mh(hs.NewHandle(result));
+  MethodHelper this_mh(hs.NewHandle(this));
+  DCHECK(result == NULL || this_mh.HasSameNameAndSignature(&result_mh));
+#endif
   return result;
 }