From c8309515d099992b7cab8f2b8c6db3ed77671ff4 Mon Sep 17 00:00:00 2001 From: Almaz Mingaleev Date: Thu, 4 Jan 2024 10:24:24 +0000 Subject: Revert "Run optimizations with baseline compilation." This reverts commit 41c5dde40d1c75d36a7f984c8d72ec65fbff3111. Reason for revert: breaks test.java.util.Arrays.Sorting Change-Id: I03385c9f1efff4b8e8bd315827dde6ed774bbb52 --- runtime/quick_exception_handler.cc | 43 +++++++++----------------------------- 1 file changed, 10 insertions(+), 33 deletions(-) (limited to 'runtime/quick_exception_handler.cc') diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 86a2ddabfd..590a596c1f 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -407,10 +407,6 @@ class DeoptimizeStackVisitor final : public StackVisitor { return bottom_shadow_frame_; } - const std::vector& GetDexPcs() const { - return dex_pcs_; - } - void FinishStackWalk() REQUIRES_SHARED(Locks::mutator_lock_) { // This is the upcall, or the next full frame in single-frame deopt, or the // code isn't deoptimizeable. We remember the frame and last pc so that we @@ -519,14 +515,11 @@ class DeoptimizeStackVisitor final : public StackVisitor { } prev_shadow_frame_ = new_frame; - if (single_frame_deopt_) { - dex_pcs_.push_back(GetDexPc()); - if (!IsInInlinedFrame()) { - // Single-frame deopt ends at the first non-inlined frame and needs to store that method. - single_frame_done_ = true; - single_frame_deopt_method_ = method; - single_frame_deopt_quick_method_header_ = GetCurrentOatQuickMethodHeader(); - } + if (single_frame_deopt_ && !IsInInlinedFrame()) { + // Single-frame deopt ends at the first non-inlined frame and needs to store that method. + single_frame_done_ = true; + single_frame_deopt_method_ = method; + single_frame_deopt_quick_method_header_ = GetCurrentOatQuickMethodHeader(); } callee_method_ = method; return true; @@ -666,7 +659,6 @@ class DeoptimizeStackVisitor final : public StackVisitor { // a deopt after running method exit callbacks if the callback throws or requests events that // need a deopt. bool skip_method_exit_callbacks_; - std::vector dex_pcs_; DISALLOW_COPY_AND_ASSIGN(DeoptimizeStackVisitor); }; @@ -747,26 +739,11 @@ void QuickExceptionHandler::DeoptimizeSingleFrame(DeoptimizationKind kind) { case Instruction::INVOKE_VIRTUAL: case Instruction::INVOKE_INTERFACE_RANGE: case Instruction::INVOKE_VIRTUAL_RANGE: { - uint32_t encoded_dex_pc = InlineCache::EncodeDexPc( - visitor.GetSingleFrameDeoptMethod(), - visitor.GetDexPcs(), - runtime->GetJit()->GetJitCompiler()->GetInlineMaxCodeUnits()); - if (encoded_dex_pc != static_cast(-1)) { - // The inline cache comes from the top-level method. - runtime->GetJit()->GetCodeCache()->MaybeUpdateInlineCache( - visitor.GetSingleFrameDeoptMethod(), - encoded_dex_pc, - shadow_frame->GetVRegReference(inst->VRegC())->GetClass(), - self_); - } else { - // If the top-level inline cache did not exist, update the one for the - // bottom method, we know it's the one that was used for compilation. - runtime->GetJit()->GetCodeCache()->MaybeUpdateInlineCache( - shadow_frame->GetMethod(), - dex_pc, - shadow_frame->GetVRegReference(inst->VRegC())->GetClass(), - self_); - } + runtime->GetJit()->GetCodeCache()->MaybeUpdateInlineCache( + shadow_frame->GetMethod(), + dex_pc, + shadow_frame->GetVRegReference(inst->VRegC())->GetClass(), + self_); break; } default: { -- cgit v1.2.3-59-g8ed1b