diff options
| author | 2016-04-07 13:52:48 -0700 | |
|---|---|---|
| committer | 2016-04-07 15:27:01 -0700 | |
| commit | 93e94f228f7a9ec5c2a29553010e585d583ac530 (patch) | |
| tree | 4f01e0f8bd8c4256b8a2f061f7d9502a8bb946ab /runtime/interpreter/interpreter_switch_impl.cc | |
| parent | f2197e43f42499be852a0fce2d755f25e2007be8 (diff) | |
ART: Fix interpreter single-step when doing OSR
Records an interpreter exit when in single-step mode and we've
finished processing the method via on-stack replacement.
Change-Id: I7a7d9ee9e4f3fbf7f829d9f54eca0e7c64395003
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
| -rw-r--r-- | runtime/interpreter/interpreter_switch_impl.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc index 0488dbf028..43889c6666 100644 --- a/runtime/interpreter/interpreter_switch_impl.cc +++ b/runtime/interpreter/interpreter_switch_impl.cc @@ -37,6 +37,7 @@ namespace interpreter { shadow_frame.GetLockCountData(). \ CheckAllMonitorsReleasedOrThrow<do_assignability_check>(self); \ if (interpret_one_instruction) { \ + /* Signal mterp to return to caller */ \ shadow_frame.SetDexPC(DexFile::kDexNoIndex); \ } \ return JValue(); /* Handled in caller. */ \ @@ -76,6 +77,10 @@ namespace interpreter { instrumentation->Branch(self, method, dex_pc, offset); \ JValue result; \ if (jit::Jit::MaybeDoOnStackReplacement(self, method, dex_pc, offset, &result)) { \ + if (interpret_one_instruction) { \ + /* OSR has completed execution of the method. Signal mterp to return to caller */ \ + shadow_frame.SetDexPC(DexFile::kDexNoIndex); \ + } \ return result; \ } \ } while (false) @@ -205,6 +210,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, result); } if (interpret_one_instruction) { + /* Signal mterp to return to caller */ shadow_frame.SetDexPC(DexFile::kDexNoIndex); } return result; @@ -221,6 +227,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, result); } if (interpret_one_instruction) { + /* Signal mterp to return to caller */ shadow_frame.SetDexPC(DexFile::kDexNoIndex); } return result; @@ -238,6 +245,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, result); } if (interpret_one_instruction) { + /* Signal mterp to return to caller */ shadow_frame.SetDexPC(DexFile::kDexNoIndex); } return result; @@ -254,6 +262,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, result); } if (interpret_one_instruction) { + /* Signal mterp to return to caller */ shadow_frame.SetDexPC(DexFile::kDexNoIndex); } return result; @@ -292,6 +301,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, result); } if (interpret_one_instruction) { + /* Signal mterp to return to caller */ shadow_frame.SetDexPC(DexFile::kDexNoIndex); } return result; |