From de9d355a352bd4376cbaf6744d89e6673f29898b Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Wed, 8 Jun 2022 09:02:19 +0000 Subject: Report DexPcMoved events only when required We used to report DexPCMove events unconditionally when running in interpreter. This Cl makes it so we only report if 1. The method is deoptimized for breakpoints 2. The thread is deoptimized for single stepping 3. Interpreter stubs installed. When interpreter stubs are installed no additional data is available on whether we are single stepping / if method has breakpoints etc., so we cannot optimize this further. Bug: 206029744 Change-Id: Iaf059bc2ed74ca5174d445d46f3dc0d4bb0106b9 --- runtime/interpreter/interpreter_switch_impl-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/interpreter/interpreter_switch_impl-inl.h') diff --git a/runtime/interpreter/interpreter_switch_impl-inl.h b/runtime/interpreter/interpreter_switch_impl-inl.h index 5e744dc20b..62bf7d8fa3 100644 --- a/runtime/interpreter/interpreter_switch_impl-inl.h +++ b/runtime/interpreter/interpreter_switch_impl-inl.h @@ -144,7 +144,7 @@ class InstructionHandler { if (!CheckForceReturn()) { return false; } - if (UNLIKELY(Instrumentation()->HasDexPcListeners())) { + if (UNLIKELY(shadow_frame_.GetNotifyDexPcMoveEvents())) { uint8_t opcode = inst_->Opcode(inst_data_); bool is_move_result_object = (opcode == Instruction::MOVE_RESULT_OBJECT); JValue* save_ref = is_move_result_object ? &ctx_->result_register : nullptr; -- cgit v1.2.3-59-g8ed1b