diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-12-03 08:32:55 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-12-03 08:32:55 +0000 |
commit | c90dfb6d83f6b51da9d5f2e7816d5d2de1ce3ecc (patch) | |
tree | ae55d22c73af57ff516bec440ce9a28a3320b7eb /runtime/art_method.cc | |
parent | 2ff6bd7ad049e2003342aaf60898fdfc68130908 (diff) | |
parent | f630f1f7781529cc2dd1151faf7523a53d45d6e2 (diff) |
Snap for 4481641 from f630f1f7781529cc2dd1151faf7523a53d45d6e2 to pi-release
Change-Id: Ib4edfa41e843d78fecf3371fb671479342411aa5
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r-- | runtime/art_method.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc index bdbc4509f3f..43a51391b93 100644 --- a/runtime/art_method.cc +++ b/runtime/art_method.cc @@ -692,13 +692,15 @@ void ArtMethod::CopyFrom(ArtMethod* src, PointerSize image_pointer_size) { declaring_class_ = GcRoot<mirror::Class>(const_cast<ArtMethod*>(src)->GetDeclaringClass()); // If the entry point of the method we are copying from is from JIT code, we just - // put the entry point of the new method to interpreter. We could set the entry point - // to the JIT code, but this would require taking the JIT code cache lock to notify - // it, which we do not want at this level. + // put the entry point of the new method to interpreter or GenericJNI. We could set + // the entry point to the JIT code, but this would require taking the JIT code cache + // lock to notify it, which we do not want at this level. Runtime* runtime = Runtime::Current(); if (runtime->UseJitCompilation()) { if (runtime->GetJit()->GetCodeCache()->ContainsPc(GetEntryPointFromQuickCompiledCode())) { - SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(), image_pointer_size); + SetEntryPointFromQuickCompiledCodePtrSize( + src->IsNative() ? GetQuickGenericJniStub() : GetQuickToInterpreterBridge(), + image_pointer_size); } } // Clear the profiling info for the same reasons as the JIT code. |