diff options
| author | 2017-04-12 13:43:15 -0700 | |
|---|---|---|
| committer | 2017-08-21 16:44:57 -0700 | |
| commit | edeba10d523c3e283ab939a16c7203af32c7707e (patch) | |
| tree | 88f13395178e7a17979dcb0666c65c024732be6b /runtime/interpreter/interpreter.h | |
| parent | c9d88538d73680563f7a6e73885acfff2c55ef58 (diff) | |
Allow deoptimization when returning from a runtime method.
This CL patches the return pc of a runtime method to allow the top
Java frame to be deoptimized. This should fix the issue that debugger
cannot break in a busy loop. It also means we can now do full async
deoptimization, if we want to enable it by letting environment keep
registers live.
art_quick_instrumentation_exit and art_quick_deoptimize now need to save
all registers since some compiler slow paths assume runtime methods save
everything.
Some special handling needs to be done to decide whether dex_pc should
be advanced when deoptimized back to interpreter.
Test: run-test/gtest on both host and target, and 597-deopt-runtime-method.
Bug: 33616143
Change-Id: I2e2c199998825afd5057f7deadfc8fa203ce1936
Diffstat (limited to 'runtime/interpreter/interpreter.h')
| -rw-r--r-- | runtime/interpreter/interpreter.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter.h b/runtime/interpreter/interpreter.h index 65cfade09a..df8568edcd 100644 --- a/runtime/interpreter/interpreter.h +++ b/runtime/interpreter/interpreter.h @@ -30,6 +30,7 @@ class ArtMethod; union JValue; class ShadowFrame; class Thread; +enum class DeoptimizationMethodType; namespace interpreter { @@ -44,8 +45,11 @@ extern void EnterInterpreterFromInvoke(Thread* self, ArtMethod* method, REQUIRES_SHARED(Locks::mutator_lock_); // 'from_code' denotes whether the deoptimization was explicitly triggered by compiled code. -extern void EnterInterpreterFromDeoptimize(Thread* self, ShadowFrame* shadow_frame, bool from_code, - JValue* ret_val) +extern void EnterInterpreterFromDeoptimize(Thread* self, + ShadowFrame* shadow_frame, + JValue* ret_val, + bool from_code, + DeoptimizationMethodType method_type) REQUIRES_SHARED(Locks::mutator_lock_); extern JValue EnterInterpreterFromEntryPoint(Thread* self, const DexFile::CodeItem* code_item, |