diff options
author | 2022-12-16 18:38:16 +0000 | |
---|---|---|
committer | 2023-01-16 09:52:42 +0000 | |
commit | e52e4fb74e9f13009af4ffbfb2e5103ce035a94b (patch) | |
tree | f8ed6faeb6204eb3e3c67b1b88f49a4482a43ebe /runtime/quick_exception_handler.cc | |
parent | e92bc531dc1eeb50cd4f46e2fb4ea581a24b45ac (diff) |
We no longer use instrumentation stubs remove the support code
Remove the code to handle instrumentation stubs. We no longer use them.
Bug: 206029744
Test: art/test.py
Change-Id: I2b7eabf80bd34989314c0d2b299d7b1b35de0b85
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 8aac7020bd..fd57b4ae83 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -53,8 +53,6 @@ QuickExceptionHandler::QuickExceptionHandler(Thread* self, bool is_deoptimizatio : self_(self), context_(self->GetLongJumpContext()), is_deoptimization_(is_deoptimization), - method_tracing_active_(is_deoptimization || - Runtime::Current()->GetInstrumentation()->AreExitStubsInstalled()), handler_quick_frame_(nullptr), handler_quick_frame_pc_(0), handler_method_header_(nullptr), @@ -253,8 +251,6 @@ void QuickExceptionHandler::FindCatch(ObjPtr<mirror::Throwable> exception, exception_ref); } while (!popped_to_top); - // Pop off frames on instrumentation stack to keep it in sync with what is on the stack. - instr->PopInstrumentationStackUntil(self_, reinterpret_cast<uintptr_t>(handler_quick_frame_)); if (!clear_exception_) { // Put exception back in root set with clear throw location. self_->SetException(exception_ref.Get()); @@ -722,21 +718,8 @@ void QuickExceptionHandler::DeoptimizeSingleFrame(DeoptimizationKind kind) { PrepareForLongJumpToInvokeStubOrInterpreterBridge(); } -void QuickExceptionHandler::DeoptimizePartialFragmentFixup(uintptr_t return_pc) { - // At this point, the instrumentation stack has been updated. We need to install - // the real return pc on stack, in case instrumentation stub is stored there, - // so that the interpreter bridge code can return to the right place. JITed - // frames in Java debuggable runtimes may not have an instrumentation stub, so - // update the PC only when required. - uintptr_t* pc_addr = reinterpret_cast<uintptr_t*>(handler_quick_frame_); - CHECK(pc_addr != nullptr); - pc_addr--; - if (return_pc != 0 && - (*reinterpret_cast<uintptr_t*>(pc_addr)) == - reinterpret_cast<uintptr_t>(GetQuickInstrumentationExitPc())) { - *reinterpret_cast<uintptr_t*>(pc_addr) = return_pc; - } - +void QuickExceptionHandler::DeoptimizePartialFragmentFixup() { + CHECK(handler_quick_frame_ != nullptr); // Architecture-dependent work. This is to get the LR right for x86 and x86-64. if (kRuntimeISA == InstructionSet::kX86 || kRuntimeISA == InstructionSet::kX86_64) { // On x86, the return address is on the stack, so just reuse it. Otherwise we would have to @@ -746,17 +729,6 @@ void QuickExceptionHandler::DeoptimizePartialFragmentFixup(uintptr_t return_pc) } } -uintptr_t QuickExceptionHandler::UpdateInstrumentationStack() { - DCHECK(is_deoptimization_) << "Non-deoptimization handlers should use FindCatch"; - uintptr_t return_pc = 0; - if (method_tracing_active_) { - instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation(); - return_pc = instrumentation->PopInstrumentationStackUntil( - self_, reinterpret_cast<uintptr_t>(handler_quick_frame_)); - } - return return_pc; -} - void QuickExceptionHandler::DoLongJump(bool smash_caller_saves) { // Place context back on thread so it will be available when we continue. self_->ReleaseLongJumpContext(context_); |