diff options
| author | 2014-07-24 16:26:09 -0700 | |
|---|---|---|
| committer | 2014-08-06 12:49:57 -0700 | |
| commit | f0a3f09c3d54646166a55c05a6b39c7dd504129c (patch) | |
| tree | 35a76479f1b774ae100727547a48da5bc0878e66 /runtime/class_linker.cc | |
| parent | 484e2c2d3531e5bb36f0e1e12f26c708939c6579 (diff) | |
Fix proxy tracing and enable tests that now work with tracing.
Also updates proxy_test to generate an image for GetQuickOatCodeFor.
Bug: 16386215
Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
Diffstat (limited to 'runtime/class_linker.cc')
| -rw-r--r-- | runtime/class_linker.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index c1e3b257f7..f0b1b9578f 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -3516,14 +3516,19 @@ mirror::ArtMethod* ClassLinker::CreateProxyConstructor(Thread* self, proxy_class->GetDirectMethods(); CHECK_EQ(proxy_direct_methods->GetLength(), 16); mirror::ArtMethod* proxy_constructor = proxy_direct_methods->Get(2); - // 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) { + mirror::ArtMethod* constructor = down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self)); + if (constructor == nullptr) { CHECK(self->IsExceptionPending()); // OOME. - return NULL; + return nullptr; } + // 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()); |