diff options
author | 2024-01-31 11:28:11 +0000 | |
---|---|---|
committer | 2024-02-01 05:06:10 +0000 | |
commit | d9f18b27494413f8a5dbc8d9a27f5c4d9ec2f30d (patch) | |
tree | af4dc77faf28c6526c756ba151c00fceafd578ef | |
parent | 585587e9973c04bb43cb5bc14068f89b0e1a6e64 (diff) |
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
-rw-r--r-- | runtime/interpreter/interpreter.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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()); |