summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-09-29 18:00:03 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-09-30 09:05:15 +0100
commit1920c1036ebe6dcdc93959714c9fdcedc199baf0 (patch)
treee36976aea8f789ceb037b66308d1ec84a0421772 /runtime/entrypoints/entrypoint_utils-inl.h
parent0766e3ff5638b14d6b3ea6157c800eed11be5b98 (diff)
Revert "Revert "Enable optimizations with --debuggable.""
This reverts commit b7d27a53cb280a943c0a63a9e0806cf8e3ae4cde. Change-Id: I398c23863e4fd86a3112076417378d22efd08306
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index cc3eefed34..8ae0b0796f 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -71,44 +71,6 @@ inline ArtMethod* GetResolvedMethod(ArtMethod* outer_method,
*outer_method->GetDexFile(), method_index, dex_cache, class_loader, nullptr, invoke_type);
}
-inline ArtMethod* GetCalleeSaveMethodCaller(ArtMethod** sp,
- Runtime::CalleeSaveType type,
- bool do_caller_check = false)
- SHARED_REQUIRES(Locks::mutator_lock_) {
- DCHECK_EQ(*sp, Runtime::Current()->GetCalleeSaveMethod(type));
-
- const size_t callee_frame_size = GetCalleeSaveFrameSize(kRuntimeISA, type);
- auto** caller_sp = reinterpret_cast<ArtMethod**>(
- reinterpret_cast<uintptr_t>(sp) + callee_frame_size);
- ArtMethod* outer_method = *caller_sp;
- ArtMethod* caller = outer_method;
-
- if ((outer_method != nullptr) && outer_method->IsOptimized(sizeof(void*))) {
- const size_t callee_return_pc_offset = GetCalleeSaveReturnPcOffset(kRuntimeISA, type);
- uintptr_t caller_pc = *reinterpret_cast<uintptr_t*>(
- (reinterpret_cast<uint8_t*>(sp) + callee_return_pc_offset));
- uintptr_t native_pc_offset = outer_method->NativeQuickPcOffset(caller_pc);
- CodeInfo code_info = outer_method->GetOptimizedCodeInfo();
- StackMapEncoding encoding = code_info.ExtractEncoding();
- StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding);
- DCHECK(stack_map.IsValid());
- if (stack_map.HasInlineInfo(encoding)) {
- InlineInfo inline_info = code_info.GetInlineInfoOf(stack_map, encoding);
- caller = GetResolvedMethod(outer_method, inline_info, inline_info.GetDepth() - 1);
- }
- }
-
- if (kIsDebugBuild && do_caller_check) {
- // Note that do_caller_check is optional, as this method can be called by
- // stubs, and tests without a proper call stack.
- NthCallerVisitor visitor(Thread::Current(), 1, true);
- visitor.WalkStack();
- CHECK_EQ(caller, visitor.caller);
- }
-
- return caller;
-}
-
inline ArtMethod* GetCalleeSaveMethodCaller(Thread* self, Runtime::CalleeSaveType type)
SHARED_REQUIRES(Locks::mutator_lock_) {
return GetCalleeSaveMethodCaller(