summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-02-19 13:41:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-02-19 13:41:08 +0000
commit05d77c2673082b371129f8d854439688533cfff2 (patch)
tree1dda0a3061f62bfd2dd13a9dad0fac75d41c2d51 /runtime/quick_exception_handler.cc
parent52d9c2f0c584877e9c7f9e859d8068b3a2ccb12f (diff)
parentb52de2427700ebdecc904aa2f3f59a079319abd5 (diff)
Merge "Fix braino in single frame deopt."
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index dd384c7586..2dfa860dcb 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -290,13 +290,18 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
stacked_shadow_frame_pushed_(false),
single_frame_deopt_(single_frame),
single_frame_done_(false),
- single_frame_deopt_method_(nullptr) {
+ single_frame_deopt_method_(nullptr),
+ single_frame_deopt_quick_method_header_(nullptr) {
}
ArtMethod* GetSingleFrameDeoptMethod() const {
return single_frame_deopt_method_;
}
+ const OatQuickMethodHeader* GetSingleFrameDeoptQuickMethodHeader() const {
+ return single_frame_deopt_quick_method_header_;
+ }
+
bool VisitFrame() OVERRIDE SHARED_REQUIRES(Locks::mutator_lock_) {
exception_handler_->SetHandlerFrameDepth(GetFrameDepth());
ArtMethod* method = GetMethod();
@@ -368,6 +373,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
exception_handler_->SetHandlerQuickArg0(reinterpret_cast<uintptr_t>(method));
single_frame_done_ = true;
single_frame_deopt_method_ = method;
+ single_frame_deopt_quick_method_header_ = GetCurrentOatQuickMethodHeader();
}
return true;
}
@@ -603,6 +609,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
const bool single_frame_deopt_;
bool single_frame_done_;
ArtMethod* single_frame_deopt_method_;
+ const OatQuickMethodHeader* single_frame_deopt_quick_method_header_;
DISALLOW_COPY_AND_ASSIGN(DeoptimizeStackVisitor);
};
@@ -636,7 +643,7 @@ void QuickExceptionHandler::DeoptimizeSingleFrame() {
DCHECK(deopt_method != nullptr);
if (Runtime::Current()->UseJit()) {
Runtime::Current()->GetJit()->GetCodeCache()->InvalidateCompiledCodeFor(
- deopt_method, handler_method_header_);
+ deopt_method, visitor.GetSingleFrameDeoptQuickMethodHeader());
} else {
// Transfer the code to interpreter.
Runtime::Current()->GetInstrumentation()->UpdateMethodsCode(