From d9f18b27494413f8a5dbc8d9a27f5c4d9ec2f30d Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Wed, 31 Jan 2024 11:28:11 +0000 Subject: Don't try to use JIT code if we need dex pc move events We try and transition to JITed code when we start in interpreter if don't need to run in interpreter. We check for a few conditions but missed checking if we need to call dex pc move events for this methods. This CL extends the condition to check if we need dex pc move events. In practice, this isn't a problem since we are only checking if the entrypoint is JITed code but impacts only jit-on-first-use config. It is cleaner to add this check. Bug: 315751006 Test: art/test.py Change-Id: I7734eb581dba39ed57c0068d192d481899caea5e --- runtime/interpreter/interpreter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/interpreter/interpreter.cc') diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index fa0a02f997..6097077fe2 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -272,7 +272,10 @@ static inline JValue Execute( ArtMethod *method = shadow_frame.GetMethod(); // If we can continue in JIT and have JITed code available execute JITed code. - if (!stay_in_interpreter && !self->IsForceInterpreter() && !shadow_frame.GetForcePopFrame()) { + if (!stay_in_interpreter && + !self->IsForceInterpreter() && + !shadow_frame.GetForcePopFrame() && + !shadow_frame.GetNotifyDexPcMoveEvents()) { jit::Jit* jit = Runtime::Current()->GetJit(); if (jit != nullptr) { jit->MethodEntered(self, shadow_frame.GetMethod()); -- cgit v1.2.3-59-g8ed1b